gradle
8.3

# InputArtifactDependencies

@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = [ElementType.METHOD])
@Documented
@InjectionPointQualifier(supportedTypes = FileCollection::class)
annotation class InputArtifactDependencies

Attach this annotation to an abstract getter that should receive the artifact dependencies of the InputArtifact of an artifact transform.

For example, when a project depends on `spring-web`, when the project is transformed (i.e. the project is the input artifact), the input artifact dependencies are the file collection containing the `spring-web` JAR and all its dependencies like e.g. the `spring-core` JAR. The abstract getter must be declared as type org.gradle.api.file.FileCollection. The order of the files matches that of the dependencies declared for the input artifact.

Example usage:

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

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

        @InputArtifact
        public abstract Provider<FileSystemLocation> getInputArtifact();

        @InputArtifactDependencies
        public abstract FileCollection getDependencies();

        @Override
        public void transform(TransformOutputs outputs) {
            FileCollection dependencies = getDependencies();
            // Do something with the dependencies
        }
    }

Content copied to clipboard

## 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