use of org.gradle.api.internal.tasks.execution.TaskProperties in project gradle by gradle.
the class DefaultTaskExecutionPlan method getResolvedTaskMutationInfo.
private TaskMutationInfo getResolvedTaskMutationInfo(TaskInfo taskInfo) {
TaskInternal task = taskInfo.getTask();
TaskMutationInfo taskMutationInfo = taskMutations.get(taskInfo);
if (!taskMutationInfo.resolved) {
ProjectInternal project = (ProjectInternal) task.getProject();
ServiceRegistry serviceRegistry = project.getServices();
PathToFileResolver resolver = serviceRegistry.get(PathToFileResolver.class);
PropertyWalker propertyWalker = serviceRegistry.get(PropertyWalker.class);
TaskProperties taskProperties = DefaultTaskProperties.resolve(propertyWalker, resolver, task);
taskMutationInfo.outputPaths.addAll(getOutputPaths(canonicalizedFileCache, taskInfo, taskProperties.getOutputFiles(), taskProperties.getLocalStateFiles()));
taskMutationInfo.destroyablePaths.addAll(getDestroyablePaths(canonicalizedFileCache, taskInfo, taskProperties.getDestroyableFiles()));
taskMutationInfo.hasFileInputs = !taskProperties.getInputFileProperties().isEmpty();
taskMutationInfo.hasOutputs = taskProperties.hasDeclaredOutputs();
taskMutationInfo.hasLocalState = !taskProperties.getLocalStateFiles().isEmpty();
taskMutationInfo.resolved = true;
}
return taskMutationInfo;
}
Aggregations