use of org.gradle.internal.build.ExportedTaskNode in project gradle by gradle.
the class DefaultBuildController method finalizeWorkGraph.
@Override
public void finalizeWorkGraph() {
assertInState(State.DiscoveringTasks);
if (!queuedForExecution.isEmpty()) {
throw new IllegalStateException("Queued tasks have not been scheduled.");
}
// TODO - This check should live in the task execution plan, so that it can reuse checks that have already been performed and
// also check for cycles across all nodes
Set<TaskInternal> visited = new HashSet<>();
Set<TaskInternal> visiting = new HashSet<>();
for (ExportedTaskNode node : scheduled) {
checkForCyclesFor(node.getTask(), visited, visiting);
}
workGraph.finalizeGraph();
state = State.ReadyToRun;
}
use of org.gradle.internal.build.ExportedTaskNode in project gradle by gradle.
the class DefaultIncludedBuildTaskGraph method locateTask.
@Override
public IncludedBuildTaskResource locateTask(TaskIdentifier taskIdentifier) {
return withState(workGraph -> {
BuildState build = buildRegistry.getBuild(taskIdentifier.getBuildIdentifier());
ExportedTaskNode taskNode = build.getWorkGraph().locateTask(taskIdentifier);
return new TaskBackedResource(workGraph, build, taskNode);
});
}
Aggregations