File tree Expand file tree Collapse file tree
docs/configuration/merging
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks Expand file tree Collapse file tree 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
397397
398398- ` EXCLUDE ` : The ** first** ` foo/bar ` file will be included in the final JAR.
399399- ` 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.
401401- ` INHERIT ` : ** Fail** the build with an exception like
402402 ` 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 .
404404
405405** NOTE:** The ` duplicatesStrategy ` takes precedence over transforming and relocating. If you mix the usages of
406406` 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() {
196196 /* *
197197 * Returns the strategy to use when trying to copy more than one file to the same destination.
198198 *
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].
200200 *
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:
203202 *
204203 * - [EXCLUDE]: The **first** `foo/bar` file will be included in the final JAR.
205204 * - [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.
207206 * - [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 .
209208 *
210209 * **NOTE:** The strategy takes precedence over transforming and relocating.
211210 * 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