Search in sources :

Example 1 with DefaultResolvedComponentResult

use of org.gradle.api.internal.artifacts.result.DefaultResolvedComponentResult in project gradle by gradle.

the class DefaultResolutionResultBuilder method visitOutgoingEdges.

public void visitOutgoingEdges(Long fromComponent, Collection<? extends DependencyResult> dependencies) {
    for (DependencyResult d : dependencies) {
        DefaultResolvedComponentResult from = modules.get(fromComponent);
        org.gradle.api.artifacts.result.DependencyResult dependency;
        if (d.getFailure() != null) {
            dependency = dependencyResultFactory.createUnresolvedDependency(d.getRequested(), from, d.getReason(), d.getFailure());
        } else {
            DefaultResolvedComponentResult selected = modules.get(d.getSelected());
            dependency = dependencyResultFactory.createResolvedDependency(d.getRequested(), from, selected);
            selected.addDependent((ResolvedDependencyResult) dependency);
        }
        from.addDependency(dependency);
    }
}
Also used : ResolvedDependencyResult(org.gradle.api.artifacts.result.ResolvedDependencyResult) DependencyResult(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyResult) DefaultResolvedComponentResult(org.gradle.api.internal.artifacts.result.DefaultResolvedComponentResult)

Aggregations

ResolvedDependencyResult (org.gradle.api.artifacts.result.ResolvedDependencyResult)1 DependencyResult (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyResult)1 DefaultResolvedComponentResult (org.gradle.api.internal.artifacts.result.DefaultResolvedComponentResult)1