Search in sources :

Example 1 with TaskNodeFactory

use of org.gradle.execution.plan.TaskNodeFactory 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());
        }
    }
}
Also used : TaskNode(org.gradle.execution.plan.TaskNode) ExportedTaskNode(org.gradle.internal.build.ExportedTaskNode) TaskNodeFactory(org.gradle.execution.plan.TaskNodeFactory) TaskNode(org.gradle.execution.plan.TaskNode) Node(org.gradle.execution.plan.Node) ExportedTaskNode(org.gradle.internal.build.ExportedTaskNode)

Aggregations

Node (org.gradle.execution.plan.Node)1 TaskNode (org.gradle.execution.plan.TaskNode)1 TaskNodeFactory (org.gradle.execution.plan.TaskNodeFactory)1 ExportedTaskNode (org.gradle.internal.build.ExportedTaskNode)1