use of org.gradle.api.internal.tasks.properties.GetInputFilesVisitor in project gradle by gradle.
the class DefaultTaskProperties method resolve.
public static TaskProperties resolve(PropertyWalker propertyWalker, PathToFileResolver resolver, TaskInternal task) {
String beanName = task.toString();
GetInputFilesVisitor inputFilesVisitor = new GetInputFilesVisitor();
GetOutputFilesVisitor outputFilesVisitor = new GetOutputFilesVisitor();
GetInputPropertiesVisitor inputPropertiesVisitor = new GetInputPropertiesVisitor(beanName);
GetLocalStateVisitor localStateVisitor = new GetLocalStateVisitor(beanName, resolver);
GetDestroyablesVisitor destroyablesVisitor = new GetDestroyablesVisitor(beanName, resolver);
ValidationVisitor validationVisitor = new ValidationVisitor();
try {
TaskPropertyUtils.visitProperties(propertyWalker, task, new CompositePropertyVisitor(inputPropertiesVisitor, inputFilesVisitor, outputFilesVisitor, validationVisitor, destroyablesVisitor, localStateVisitor));
} catch (Exception e) {
throw new TaskExecutionException(task, e);
}
return new DefaultTaskProperties(task.toString(), inputPropertiesVisitor.getPropertyValuesFactory(), inputFilesVisitor.getFileProperties(), outputFilesVisitor.getFileProperties(), outputFilesVisitor.hasDeclaredOutputs(), localStateVisitor.getFiles(), destroyablesVisitor.getFiles(), validationVisitor.getTaskPropertySpecs());
}
use of org.gradle.api.internal.tasks.properties.GetInputFilesVisitor in project gradle by gradle.
the class DefaultTaskInputs method getHasSourceFiles.
@Override
public boolean getHasSourceFiles() {
GetInputFilesVisitor visitor = new GetInputFilesVisitor(task.toString(), fileCollectionFactory);
TaskPropertyUtils.visitProperties(propertyWalker, task, visitor);
return visitor.hasSourceFiles();
}
Aggregations