Preserve First Found Resource Transformer
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 project's.
This transformer deduplicates included resources based on the path name. See DeduplicatingResourceTransformer for a transformer that deduplicates based on the paths and contents of the resources.
Warning Do not combine DeduplicatingResourceTransformer with this transformer, as they handle duplicates differently and combining them would lead to redundant or unexpected behavior.
See also
Constructors
Properties
This is used for creating Gradle's lazy properties in the subclass, Shadow's build-in transformers that depend on this have been injected via ObjectFactory.newInstance. Custom transformers should implement or inject this property if they need to access it.