Skip to content

Commit

Permalink
✏️ clarify library usage
Browse files Browse the repository at this point in the history
The recommended usage of this implementation is to use it as library.

Fixes #6
  • Loading branch information
TheBoegl committed Jan 12, 2018
1 parent f8bcd87 commit 0ebb2a8
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Log4j 2 Transformer for Gradle Shadow Plugin
# Log4j 2 Transformer implementation for Gradle Shadow Plugin

A [shadow plugin](https://github.com/johnrengelman/shadow) transformer implementation for log4j to concatenate Log4j2Plugins.dat files.

Expand All @@ -8,24 +8,25 @@ This is a port of the [maven-shaded-log4j-transformer](https://github.com/edwgiz
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.2`. 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`.
At the time of writing, the latest shadow plugin version was `2.0.2`. Therefore, you should use this library's version starting with `2`.
If you are stuck at version `1.2.4` use the library version starting with `1`.

## Latest Version
[![Download](https://api.bintray.com/packages/theboegl/gradle-plugins/shadow-log4j-transformer/images/download.svg) ](https://bintray.com/theboegl/gradle-plugins/shadow-log4j-transformer/_latestVersion)<br>
The latest plugin version is `2.1.1`. It requires at least __Java 7__.
The latest library version is `2.1.1`. It requires at least __Java 7__.

You can get version notifications on bintray:<br>[![Get automatic notifications about new "shadow-log4j-transformer" versions](https://www.bintray.com/docs/images/bintray_badge_color.png)](https://bintray.com/theboegl/gradle-plugins/shadow-log4j-transformer?source=watch)

## Adding the plugin to your project
## Adding the transformer implementation to your project

This plugin must work with the __shadow plugin__ and will use __Log4j 2__.
This implementation must work with the __shadow plugin__ and will use __Log4j 2__.

You can use this plugin as library or gradle plugin.
You should use this implementation as library.
You may use it as gradle plugin though this is not recommended anymore due to issues (e.g. #2, #3 and, #5).

### Usage as library

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

```gradle
Expand All @@ -43,7 +44,7 @@ shadowJar {
}
```

### Using the `apply` method
### Not recommended: 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.

```gradle
Expand All @@ -62,7 +63,7 @@ buildscript {
apply plugin: "de.sebastianboegl.shadow.transformer.log4j"
```

### Using the Gradle plugin DSL
### Not recommended: Using the Gradle plugin DSL
The order of the plugins doesn't matter:

```gradle
Expand Down

0 comments on commit 0ebb2a8

Please sign in to comment.