Preserve First Found Resource Transformer
open class PreserveFirstFoundResourceTransformer @Inject constructor(val objectFactory: ObjectFactory) : ResourceTransformer
A resource processor that preserves the first resource matched and excludes all others.
This is useful when you set shadowJar.duplicatesStrategy = DuplicatesStrategy.INCLUDE
(the default behavior) and want to ensure that only the first found resource is included in the final JAR. If there are multiple resources with the same path in a project and its dependencies, the first one found should be the projects'.
See also
Duplicates Strategy