Search in sources :

Example 1 with ResolvedArtifactsGraphVisitor

use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ResolvedArtifactsGraphVisitor in project gradle by gradle.

the class DefaultArtifactDependencyResolver method resolve.

@Override
public void resolve(ResolveContext resolveContext, List<? extends ResolutionAwareRepository> repositories, GlobalDependencyResolutionRules metadataHandler, Spec<? super DependencyMetadata> edgeFilter, DependencyGraphVisitor graphVisitor, DependencyArtifactsVisitor artifactsVisitor, AttributesSchema attributesSchema, ImmutableModuleIdentifierFactory moduleIdentifierFactory, ModuleExclusions moduleExclusions) {
    LOGGER.debug("Resolving {}", resolveContext);
    ComponentResolvers resolvers = createResolvers(resolveContext, repositories, metadataHandler);
    DependencyGraphBuilder builder = createDependencyGraphBuilder(resolvers, resolveContext.getResolutionStrategy(), metadataHandler, edgeFilter, attributesSchema, moduleIdentifierFactory, moduleExclusions);
    ArtifactResolver artifactResolver = new ErrorHandlingArtifactResolver(new CacheLockingArtifactResolver(cacheLockingManager, resolvers.getArtifactResolver()));
    BuildOperationExecutor buildOperationExecutor = serviceRegistry.get(BuildOperationExecutor.class);
    DependencyGraphVisitor artifactsGraphVisitor = new ResolvedArtifactsGraphVisitor(artifactsVisitor, artifactResolver, attributesFactory, buildOperationExecutor, moduleExclusions);
    // Resolve the dependency graph
    builder.resolve(resolveContext, new CompositeDependencyGraphVisitor(graphVisitor, artifactsGraphVisitor));
}
Also used : DependencyGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphVisitor) CompositeDependencyGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.CompositeDependencyGraphVisitor) DependencyGraphBuilder(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder) ResolvedArtifactsGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ResolvedArtifactsGraphVisitor) CacheLockingArtifactResolver(org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactResolver) CompositeDependencyGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.CompositeDependencyGraphVisitor) ErrorHandlingArtifactResolver(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingArtifactResolver) ComponentResolvers(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentResolvers) CacheLockingArtifactResolver(org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactResolver) ArtifactResolver(org.gradle.internal.resolve.resolver.ArtifactResolver) ErrorHandlingArtifactResolver(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingArtifactResolver) BuildOperationExecutor(org.gradle.internal.progress.BuildOperationExecutor)

Aggregations

CacheLockingArtifactResolver (org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactResolver)1 ComponentResolvers (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentResolvers)1 ErrorHandlingArtifactResolver (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingArtifactResolver)1 ResolvedArtifactsGraphVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ResolvedArtifactsGraphVisitor)1 CompositeDependencyGraphVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.CompositeDependencyGraphVisitor)1 DependencyGraphBuilder (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder)1 DependencyGraphVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphVisitor)1 BuildOperationExecutor (org.gradle.internal.progress.BuildOperationExecutor)1 ArtifactResolver (org.gradle.internal.resolve.resolver.ArtifactResolver)1