File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
docs/configuration/merging
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -397,10 +397,10 @@ Different strategies will lead to different results for `foo/bar` files in the J
397
397
398
398
- ` EXCLUDE ` : The ** first** ` foo/bar ` file will be included in the final JAR.
399
399
- ` FAIL ` : ** Fail** the build with a ` DuplicateFileCopyingException ` if there are duplicate ` foo/bar ` files.
400
- - ` INCLUDE ` : The ** last ** ` foo/bar ` file will be included in the final JAR (the default behavior) .
400
+ - ` INCLUDE ` : Duplicate ` foo/bar ` entries will be included in the final JAR.
401
401
- ` INHERIT ` : ** Fail** the build with an exception like
402
402
` Entry .* is a duplicate but no duplicate handling strategy has been set ` .
403
- - ` WARN ` : The ** last ** ` foo/bar ` file will be included in the final JAR, and a warning message will be logged .
403
+ - ` WARN ` : ** Warn ** about duplicates in the build log, this behaves exactly as ` INHERIT ` otherwise .
404
404
405
405
** NOTE:** The ` duplicatesStrategy ` takes precedence over transforming and relocating. If you mix the usages of
406
406
` duplicatesStrategy ` and [ ` ResourceTransformer ` ] [ ResourceTransformer ] like below:
Original file line number Diff line number Diff line change @@ -196,16 +196,15 @@ public abstract class ShadowJar : Jar() {
196
196
/* *
197
197
* Returns the strategy to use when trying to copy more than one file to the same destination.
198
198
*
199
- * This strategy can be overridden for individual files by using [filesMatching].
199
+ * This global strategy can be overridden for individual files by using [filesMatching].
200
200
*
201
- * The default value is [INCLUDE]. Different strategies will lead to different results for
202
- * `foo/bar` files in the JARs to be merged:
201
+ * The default value is [INCLUDE]. Different strategies will lead to different results for `foo/bar` files in the JARs to be merged:
203
202
*
204
203
* - [EXCLUDE]: The **first** `foo/bar` file will be included in the final JAR.
205
204
* - [FAIL]: **Fail** the build with a `DuplicateFileCopyingException` if there are duplicate `foo/bar` files.
206
- * - [INCLUDE]: The **last** `foo/bar` file will be included in the final JAR (the default behavior) .
205
+ * - [INCLUDE]: Duplicate `foo/bar` entries will be included in the final JAR.
207
206
* - [INHERIT]: **Fail** the build with an exception like `Entry .* is a duplicate but no duplicate handling strategy has been set`.
208
- * - [WARN]: The **last ** `foo/bar` file will be included in the final JAR, and a warning message will be logged .
207
+ * - [WARN]: **Warn ** about duplicates in the build log, this behaves exactly as [INHERIT] otherwise .
209
208
*
210
209
* **NOTE:** The strategy takes precedence over transforming and relocating.
211
210
* Some [ResourceTransformer]s like [ServiceFileTransformer] will not work as expected with setting the strategy to
You can’t perform that action at this time.
0 commit comments