GroovyExtensionModuleTransformer

open class GroovyExtensionModuleTransformer @JvmOverloads constructor(patternSet: PatternSet = PatternSet() .include( PATH_LEGACY_GROOVY_EXTENSION_MODULE_DESCRIPTOR, PATH_GROOVY_EXTENSION_MODULE_DESCRIPTOR, )) : PatternFilterableResourceTransformer

Aggregate Apache Groovy extension modules descriptors.

Resource transformer that merges Groovy extension module descriptor files into a single file. Groovy extension module descriptor files have the name org.codehaus.groovy.runtime.ExtensionModule and live in the META-INF/services (Groovy up to 2.4) or META-INF/groovy (Groovy 2.5+) directory. See GROOVY-8480 for more details of the change.

If there are several descriptor files spread across many JARs the individual entries will be merged into a single descriptor file which will be packaged into the resultant JAR produced by the shadowing process. It will live in the legacy directory (META-INF/services) if all the processed descriptor files came from the legacy location, otherwise it will be written into the now standard location (META-INF/groovy). Note that certain JDK9+ tooling will break when using the legacy location.

Related to org.apache.maven.plugins.shade.resource.GroovyResourceTransformer.java.

Constructors

Link copied to clipboard
constructor(patternSet: PatternSet = PatternSet() .include( PATH_LEGACY_GROOVY_EXTENSION_MODULE_DESCRIPTOR, PATH_GROOVY_EXTENSION_MODULE_DESCRIPTOR, ))

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@get:Input
open override val excludes: MutableSet<String>
Link copied to clipboard
@get:Input
open override val includes: MutableSet<String>
Link copied to clipboard
@get:Internal
open override val name: String
Link copied to clipboard
@get:Internal
open override val objectFactory: ObjectFactory

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.

Link copied to clipboard
@Internal
val patternSet: PatternSet

Functions

Link copied to clipboard
open override fun canTransformResource(element: FileTreeElement): Boolean
Link copied to clipboard
open override fun exclude(excludeSpec: Closure<*>?): PatternFilterable?
open override fun exclude(excludes: Iterable<String?>?): PatternFilterable?
open override fun exclude(excludeSpec: Spec<FileTreeElement?>?): PatternFilterable?
open override fun exclude(vararg excludes: String?): PatternFilterable?
Link copied to clipboard
@Input
open override fun getExcludes(): MutableSet<String>
Link copied to clipboard
@Input
open override fun getIncludes(): MutableSet<String>
Link copied to clipboard
@Internal
open override fun getName(): String
Link copied to clipboard
open override fun hasTransformedResource(): Boolean
Link copied to clipboard
open override fun include(includeSpec: Closure<*>?): PatternFilterable?
open override fun include(includes: Iterable<String?>?): PatternFilterable?
open override fun include(includeSpec: Spec<FileTreeElement?>?): PatternFilterable?
open override fun include(vararg includes: String?): PatternFilterable?
Link copied to clipboard
open override fun modifyOutputStream(os: ZipOutputStream, preserveFileTimestamps: Boolean)
Link copied to clipboard
open override fun setExcludes(excludes: Iterable<String?>?): PatternFilterable?
Link copied to clipboard
open override fun setIncludes(includes: Iterable<String?>?): PatternFilterable?
Link copied to clipboard
open override fun transform(context: TransformerContext)