# InputArtifact

@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = [ElementType.METHOD])
@Documented
@InjectionPointQualifier(supportedProviderTypes = [FileSystemLocation::class])
annotation class InputArtifact

Attach this annotation to an abstract getter that should receive the input artifact for an artifact transform. This is the artifact that the transform is applied to.

The abstract getter must be declared as type Provider<org.gradle.api.file.FileSystemLocation>.

Example usage:

    import org.gradle.api.artifacts.transform.TransformParameters;

    public abstract class MyTransform implements TransformAction<TransformParameters.None> {

        @InputArtifact
        public abstract Provider<FileSystemLocation> getInputArtifact();
        @Override
        public void transform(TransformOutputs outputs) {
            File input = getInputArtifact().get().getAsFile();
            // Do something with the input
        }
    }

Content copied to clipboard

#### Since

5.3

## Functions

annotationType
Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
equals
Link copied to clipboard
abstract fun equals(p: Any): Boolean
hashCode
Link copied to clipboard
abstract fun hashCode(): Int
toString
Link copied to clipboard
abstract fun toString(): String