GithubHelp home page GithubHelp logo

robbie-williams / shadow-log4j-transformer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from theboegl/shadow-log4j-transformer

0.0 1.0 0.0 96 KB

A shadow plugin transformer implementation for log4j to concatenate Log4j2Plugins.dat files.

License: Apache License 2.0

Groovy 100.00%

shadow-log4j-transformer's Introduction

Log4j 2 Transformer for Gradle Shadow Plugin

A shadow plugin transformer implementation for log4j to concatenate Log4j2Plugins.dat files.

This is a port of the maven-shaded-log4j-transformer.

Versioning Scheme

The version numbering scheme is has the following format: SHADOW_MAJOR.MINOR.PATCH. This is no real semantic versioning because the SHADOW_MAJOR version number correspond to the MAJOR shadow plugin version number.

At the time of writing, the latest shadow plugin version was 2.0.0. Therefore, you should use this plugin's version starting with 2. If you are stuck at version 1.2.4 use the plugin version starting with 1.

Latest Version

Download
The latest plugin version is 2.1.1. It requires at least Java 7.

You can get version notifications on bintray:
Get automatic notifications about new "shadow-log4j-transformer" versions

Adding the plugin to your project

This plugin must work with the shadow plugin and will use Log4j 2.

You can use this plugin as library or gradle plugin.

Usage as library

The plugin can be used as library to provide the Log4j 2 transformer. This is as easy as shown below:

buildscript {
  dependencies {
    classpath "com.github.jengelman.gradle.plugins:shadow:2.0.0"
    classpath 'de.sebastianboegl.gradle.plugins:shadow-log4j-transformer:2.1.1'
  }
}

apply plugin: 'com.github.johnrengelman.shadow'

shadowJar {
  transform(de.sebastianboegl.gradle.plugins.shadow.transformers.Log4j2PluginsFileTransformer)
}

Using the apply method

The plugin applies the latest version of the shadow plugin or the one in the dependency block, hence, you don't have to apply the shadow plugin.

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "com.github.jengelman.gradle.plugins:shadow:2.0.0"
    classpath "de.sebastianboegl.gradle.plugins:shadow-log4j-transformer:2.1.1"
  }
}

apply plugin: "de.sebastianboegl.shadow.transformer.log4j"

Using the Gradle plugin DSL

The order of the plugins doesn't matter:

plugins {
  id "com.github.johnrengelman.shadow" version "2.0.0"
  id "de.sebastianboegl.shadow.transformer.log4j" version "2.1.1"
}

Configuration

There is no configuration needed. The plugin adds itself as Transformer (see the shadow plugin documentation Section Controlling JAR Content Merging).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.