Search in sources :

Example 1 with DeclaredTaskInputFileProperty

use of org.gradle.api.internal.tasks.DeclaredTaskInputFileProperty in project gradle by gradle.

the class CompileClasspathPropertyAnnotationHandler method visitPropertyValue.

@Override
public void visitPropertyValue(PropertyValue propertyValue, PropertyVisitor visitor, PropertySpecFactory specFactory, BeanPropertyContext context) {
    DeclaredTaskInputFileProperty fileSpec = specFactory.createInputFileSpec(propertyValue, ValidationActions.NO_OP);
    fileSpec.withPropertyName(propertyValue.getPropertyName()).withNormalizer(CompileClasspathNormalizer.class).optional(propertyValue.isOptional());
    visitor.visitInputFileProperty(fileSpec);
}
Also used : DeclaredTaskInputFileProperty(org.gradle.api.internal.tasks.DeclaredTaskInputFileProperty) CompileClasspathNormalizer(org.gradle.api.tasks.CompileClasspathNormalizer)

Example 2 with DeclaredTaskInputFileProperty

use of org.gradle.api.internal.tasks.DeclaredTaskInputFileProperty in project gradle by gradle.

the class AbstractInputPropertyAnnotationHandler method visitPropertyValue.

@Override
public void visitPropertyValue(PropertyValue propertyValue, PropertyVisitor visitor, PropertySpecFactory specFactory, BeanPropertyContext context) {
    PathSensitive pathSensitive = propertyValue.getAnnotation(PathSensitive.class);
    final PathSensitivity pathSensitivity;
    if (pathSensitive == null) {
        pathSensitivity = PathSensitivity.ABSOLUTE;
    } else {
        pathSensitivity = pathSensitive.value();
    }
    DeclaredTaskInputFileProperty fileSpec = createFileSpec(propertyValue, specFactory);
    fileSpec.withPropertyName(propertyValue.getPropertyName()).optional(propertyValue.isOptional()).withPathSensitivity(pathSensitivity).skipWhenEmpty(propertyValue.isAnnotationPresent(SkipWhenEmpty.class)).optional(propertyValue.isOptional());
    visitor.visitInputFileProperty(fileSpec);
}
Also used : DeclaredTaskInputFileProperty(org.gradle.api.internal.tasks.DeclaredTaskInputFileProperty) PathSensitivity(org.gradle.api.tasks.PathSensitivity) PathSensitive(org.gradle.api.tasks.PathSensitive)

Example 3 with DeclaredTaskInputFileProperty

use of org.gradle.api.internal.tasks.DeclaredTaskInputFileProperty in project gradle by gradle.

the class ClasspathPropertyAnnotationHandler method visitPropertyValue.

@Override
public void visitPropertyValue(PropertyValue propertyValue, PropertyVisitor visitor, PropertySpecFactory specFactory, BeanPropertyContext context) {
    DeclaredTaskInputFileProperty fileSpec = specFactory.createInputFileSpec(propertyValue, ValidationActions.NO_OP);
    fileSpec.withPropertyName(propertyValue.getPropertyName()).withNormalizer(ClasspathNormalizer.class).optional(propertyValue.isOptional());
    visitor.visitInputFileProperty(fileSpec);
}
Also used : ClasspathNormalizer(org.gradle.api.tasks.ClasspathNormalizer) DeclaredTaskInputFileProperty(org.gradle.api.internal.tasks.DeclaredTaskInputFileProperty)

Aggregations

DeclaredTaskInputFileProperty (org.gradle.api.internal.tasks.DeclaredTaskInputFileProperty)3 ClasspathNormalizer (org.gradle.api.tasks.ClasspathNormalizer)1 CompileClasspathNormalizer (org.gradle.api.tasks.CompileClasspathNormalizer)1 PathSensitive (org.gradle.api.tasks.PathSensitive)1 PathSensitivity (org.gradle.api.tasks.PathSensitivity)1