Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,25 @@ public abstract class ShadowJar : Jar() {

/**
* Merge Java services files with [rootPath].
*
* *Warning*: In most cases, this should be used with the correct [getDuplicatesStrategy] to ensure duplicate service

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also provide here a link to the documentation: https://gradleup.com/shadow/configuration/merging/#handling-duplicates-strategy ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* files are handled properly. See more details in the
* [Handling Duplicates Strategy](https://gradleup.com/shadow/configuration/merging/#handling-duplicates-strategy) section.
*
* @see [getDuplicatesStrategy]
*/
public open fun mergeServiceFiles(rootPath: String) {
mergeServiceFiles { it.path = rootPath }
}

/**
* Merge Java services files with [action].
*
* *Warning*: In most cases, this should be used with the correct [getDuplicatesStrategy] to ensure duplicate service
* files are handled properly. See more details in the
* [Handling Duplicates Strategy](https://gradleup.com/shadow/configuration/merging/#handling-duplicates-strategy) section.
*
* @see [getDuplicatesStrategy]
*/
@JvmOverloads
public open fun mergeServiceFiles(action: Action<ServiceFileTransformer> = Action {}) {
Expand All @@ -309,6 +321,12 @@ public abstract class ShadowJar : Jar() {

/**
* Merge Groovy extension modules (`META-INF/**/org.codehaus.groovy.runtime.ExtensionModule`).
*
* *Warning*: In most cases, this should be used with the correct [getDuplicatesStrategy] to ensure duplicate extension module
* files are handled properly. See more details in the
* [Handling Duplicates Strategy](https://gradleup.com/shadow/configuration/merging/#handling-duplicates-strategy) section.
*
* @see [getDuplicatesStrategy]
*/
public open fun mergeGroovyExtensionModules() {
transform(GroovyExtensionModuleTransformer::class.java, action = {})
Expand Down Expand Up @@ -370,6 +388,12 @@ public abstract class ShadowJar : Jar() {

/**
* Transform resources using a [ResourceTransformer].
*
* *Warning*: Most of the [ResourceTransformer]s should be used with the correct [getDuplicatesStrategy] to ensure
* duplicate resource files are handled properly. See more details in the
* [Handling Duplicates Strategy](https://gradleup.com/shadow/configuration/merging/#handling-duplicates-strategy) section.
*
* @see [getDuplicatesStrategy]
*/
@JvmOverloads
public open fun <T : ResourceTransformer> transform(clazz: Class<T>, action: Action<T> = Action {}) {
Expand All @@ -378,6 +402,12 @@ public abstract class ShadowJar : Jar() {

/**
* Transform resources using a [ResourceTransformer].
*
* *Warning*: Most of the [ResourceTransformer]s should be used with the correct [getDuplicatesStrategy] to ensure
* duplicate resource files are handled properly. See more details in the
* [Handling Duplicates Strategy](https://gradleup.com/shadow/configuration/merging/#handling-duplicates-strategy) section.
*
* @see [getDuplicatesStrategy]
*/
@JvmOverloads
public open fun <T : ResourceTransformer> transform(transformer: T, action: Action<T> = Action {}) {
Expand All @@ -386,6 +416,12 @@ public abstract class ShadowJar : Jar() {

/**
* Transform resources using a [ResourceTransformer].
*
* *Warning*: Most of the [ResourceTransformer]s should be used with the correct [getDuplicatesStrategy] to ensure
* duplicate resource files are handled properly. See more details in the
* [Handling Duplicates Strategy](https://gradleup.com/shadow/configuration/merging/#handling-duplicates-strategy) section.
*
* @see [getDuplicatesStrategy]
*/
@JvmSynthetic
public inline fun <reified T : ResourceTransformer> transform(action: Action<T> = Action {}) {
Expand Down