Search in sources :

Example 1 with DependencyGraphNode

use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphNode in project gradle by gradle.

the class ResolvedArtifactsGraphVisitor method visitEdges.

public void visitEdges(DependencyGraphNode resolvedConfiguration) {
    for (DependencyGraphEdge dependency : resolvedConfiguration.getIncomingEdges()) {
        DependencyGraphNode parent = dependency.getFrom();
        ArtifactSet artifacts = getArtifacts(dependency, resolvedConfiguration);
        artifactResults.visitArtifacts(parent, resolvedConfiguration, artifacts);
    }
}
Also used : DependencyGraphNode(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphNode) DependencyGraphEdge(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphEdge)

Example 2 with DependencyGraphNode

use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphNode in project gradle by gradle.

the class DefaultResolvedArtifactsBuilder method topologicalSort.

private void topologicalSort(DependencyGraphNode node, Set<DependencyGraphNode> tempMarked, List<DependencyGraphNode> marked) {
    if (tempMarked.contains(node)) {
        return;
    }
    if (!marked.contains(node)) {
        tempMarked.add(node);
        List<DependencyGraphEdge> edges = Lists.newArrayList(node.getOutgoingEdges());
        for (DependencyGraphEdge dependencyEdge : Lists.reverse(edges)) {
            for (DependencyGraphNode targetConfiguration : dependencyEdge.getTargets()) {
                topologicalSort(targetConfiguration, tempMarked, marked);
            }
        }
        marked.add(node);
        tempMarked.remove(node);
    }
}
Also used : DependencyGraphNode(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphNode) DependencyGraphEdge(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphEdge)

Aggregations

DependencyGraphEdge (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphEdge)2 DependencyGraphNode (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphNode)2