Annotation Type CacheableTransform

  • @Retention(RUNTIME)
    public @interface CacheableTransform
    Attaching this annotation to a TransformAction type it indicates that the build cache should be used for artifact transforms of this type.

    Only an artifact transform that produces reproducible and relocatable outputs should be marked with CacheableTransform.

    Normalization must be specified for each file parameter of a cacheable transform. For example:

     import org.gradle.api.artifacts.transform.TransformParameters;
     public abstract class MyTransform implements TransformAction<TransformParameters.None> {
         public abstract Provider<FileSystemLocation> getInputArtifact();
         public abstract FileCollection getDependencies();
         public void transform(TransformOutputs outputs) {
             // ...
    See Also: