use of org.gradle.api.internal.tasks.execution.ResolveBuildCacheKeyExecuter in project gradle by gradle.
the class TaskExecutionServices method createTaskExecuter.
TaskExecuter createTaskExecuter(TaskArtifactStateRepository repository, TaskOutputPacker packer, BuildCacheService buildCacheService, StartParameter startParameter, ListenerManager listenerManager, GradleInternal gradle, TaskOutputOriginFactory taskOutputOriginFactory, BuildOperationExecutor buildOperationExecutor, AsyncWorkTracker asyncWorkTracker) {
// TODO - need a more comprehensible way to only collect inputs for the outer build
// - we are trying to ignore buildSrc here, but also avoid weirdness with use of GradleBuild tasks
boolean isOuterBuild = gradle.getParent() == null;
TaskInputsListener taskInputsListener = isOuterBuild ? listenerManager.getBroadcaster(TaskInputsListener.class) : TaskInputsListener.NOOP;
boolean taskOutputCacheEnabled = startParameter.isBuildCacheEnabled();
TaskOutputsGenerationListener taskOutputsGenerationListener = listenerManager.getBroadcaster(TaskOutputsGenerationListener.class);
TaskExecuter executer = new ExecuteActionsTaskExecuter(taskOutputsGenerationListener, listenerManager.getBroadcaster(TaskActionListener.class), buildOperationExecutor, asyncWorkTracker);
boolean verifyInputsEnabled = Boolean.getBoolean("org.gradle.tasks.verifyinputs");
if (verifyInputsEnabled) {
executer = new VerifyNoInputChangesTaskExecuter(repository, executer);
}
if (taskOutputCacheEnabled) {
executer = new SkipCachedTaskExecuter(taskOutputOriginFactory, buildCacheService, packer, taskOutputsGenerationListener, executer);
}
executer = new SkipUpToDateTaskExecuter(executer);
if (verifyInputsEnabled || taskOutputCacheEnabled) {
executer = new ResolveBuildCacheKeyExecuter(listenerManager.getBroadcaster(TaskOutputCachingListener.class), executer);
}
executer = new ValidatingTaskExecuter(executer);
executer = new SkipEmptySourceFilesTaskExecuter(taskInputsListener, executer);
executer = new ResolveTaskArtifactStateTaskExecuter(repository, executer);
executer = new SkipTaskWithNoActionsExecuter(executer);
executer = new SkipOnlyIfTaskExecuter(executer);
if (taskOutputCacheEnabled) {
executer = new ResolveTaskOutputCachingStateExecuter(executer);
}
executer = new ExecuteAtMostOnceTaskExecuter(executer);
executer = new CatchExceptionTaskExecuter(executer);
return executer;
}
Aggregations