use of org.gradle.execution.plan.TaskNode in project gradle by gradle.
the class DefaultBuildController method visitDependenciesOf.
private void visitDependenciesOf(TaskInternal task, Consumer<TaskInternal> consumer) {
TaskNodeFactory taskNodeFactory = ((GradleInternal) task.getProject().getGradle()).getServices().get(TaskNodeFactory.class);
TaskNode node = taskNodeFactory.getOrCreateNode(task);
for (Node dependency : node.getAllSuccessors()) {
if (dependency instanceof TaskNode) {
consumer.accept(((TaskNode) dependency).getTask());
}
}
}
use of org.gradle.execution.plan.TaskNode in project gradle by gradle.
the class DefaultTaskExecutionGraph method getDependencies.
@Override
public Set<Task> getDependencies(Task task) {
Node node = executionPlan.getNode(task);
ImmutableSet.Builder<Task> builder = ImmutableSet.builder();
for (Node dependencyNode : node.getDependencySuccessors()) {
if (dependencyNode instanceof TaskNode) {
builder.add(((TaskNode) dependencyNode).getTask());
}
}
return builder.build();
}
Aggregations