GroovyExtensionModuleTransformer

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.

Modified from eu.appsatori.gradle.fatjar.tasks.PrepareFiles.groovy. Related to org.apache.maven.plugins.shade.resource.GroovyResourceTransformer.java.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@get:Internal
open 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.

Functions

Link copied to clipboard
open override fun canTransformResource(element: FileTreeElement): Boolean
Link copied to clipboard
open override fun hasTransformedResource(): Boolean
Link copied to clipboard
open override fun modifyOutputStream(os: ZipOutputStream, preserveFileTimestamps: Boolean)
Link copied to clipboard
open override fun transform(context: TransformerContext)