api / org.gradle.api.artifacts.transform / VariantTransform / artifactTransform

artifactTransform

abstract fun artifactTransform(type: Class<out ArtifactTransform>): Unit

Action to transform artifacts for this variant transform.

An instance of the specified type is created for each file that is to be transformed. The class should provide a public zero-args constructor.

abstract fun artifactTransform(type: Class<out ArtifactTransform>, configAction: Action<in ActionConfiguration>): Unit

Action to transform artifacts for this variant transform, potentially supplying some configuration to inject into the transform.

An instance of the specified type is created for each file that is to be transformed. The class should provide a public constructor that accepts the provided configuration.