@Retention(RUNTIME) @Target(METHOD) @Documented @InjectionPointQualifier(supportedTypes=java.io.File.class, supportedProviderTypes=FileSystemLocation.class) public @interface InputArtifact
The abstract getter must be declared as type Provider<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
}
}