Search in sources :

Example 1 with DependencyGraphBuilder

use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder 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, AttributesSchemaInternal consumerSchema, ArtifactTypeRegistry artifactTypeRegistry) {
    LOGGER.debug("Resolving {}", resolveContext);
    ComponentResolversChain resolvers = createResolvers(resolveContext, repositories, metadataHandler, artifactTypeRegistry);
    DependencyGraphBuilder builder = createDependencyGraphBuilder(resolvers, resolveContext.getResolutionStrategy(), metadataHandler, edgeFilter, consumerSchema, moduleExclusions, buildOperationExecutor);
    DependencyGraphVisitor artifactsGraphVisitor = new ResolvedArtifactsGraphVisitor(artifactsVisitor, resolvers.getArtifactSelector(), 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.builder.DependencyGraphBuilder) ResolvedArtifactsGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ResolvedArtifactsGraphVisitor) CompositeDependencyGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.CompositeDependencyGraphVisitor)

Example 2 with DependencyGraphBuilder

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

the class DefaultArtifactDependencyResolver method createDependencyGraphBuilder.

private DependencyGraphBuilder createDependencyGraphBuilder(ComponentResolversChain componentSource, ResolutionStrategyInternal resolutionStrategy, GlobalDependencyResolutionRules globalRules, Spec<? super DependencyMetadata> edgeFilter, AttributesSchemaInternal attributesSchema, ModuleExclusions moduleExclusions, BuildOperationExecutor buildOperationExecutor) {
    DependencyToComponentIdResolver componentIdResolver = componentSource.getComponentIdResolver();
    ComponentMetaDataResolver componentMetaDataResolver = new ClientModuleResolver(componentSource.getComponentResolver(), dependencyDescriptorFactory);
    ResolveContextToComponentResolver requestResolver = createResolveContextConverter();
    ModuleConflictHandler conflictHandler = createModuleConflictHandler(resolutionStrategy, globalRules);
    DefaultCapabilitiesConflictHandler capabilitiesConflictHandler = createCapabilitiesConflictHandler(resolutionStrategy.getCapabilitiesResolutionRules());
    DependencySubstitutionApplicator applicator = createDependencySubstitutionApplicator(resolutionStrategy);
    return new DependencyGraphBuilder(componentIdResolver, componentMetaDataResolver, requestResolver, conflictHandler, capabilitiesConflictHandler, edgeFilter, attributesSchema, moduleExclusions, buildOperationExecutor, applicator, componentSelectorConverter, attributesFactory, versionSelectorScheme, versionComparator.asVersionComparator(), versionParser);
}
Also used : ComponentMetaDataResolver(org.gradle.internal.resolve.resolver.ComponentMetaDataResolver) ClientModuleResolver(org.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModuleResolver) ModuleConflictHandler(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.ModuleConflictHandler) DependencyGraphBuilder(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder) ResolveContextToComponentResolver(org.gradle.internal.resolve.resolver.ResolveContextToComponentResolver) DefaultCapabilitiesConflictHandler(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultCapabilitiesConflictHandler) DefaultDependencySubstitutionApplicator(org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.DefaultDependencySubstitutionApplicator) DependencySubstitutionApplicator(org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.DependencySubstitutionApplicator) CachingDependencySubstitutionApplicator(org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.CachingDependencySubstitutionApplicator) DependencyToComponentIdResolver(org.gradle.internal.resolve.resolver.DependencyToComponentIdResolver)

Example 3 with DependencyGraphBuilder

use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder 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, AttributesSchemaInternal consumerSchema, ArtifactTypeRegistry artifactTypeRegistry, boolean includeSyntheticDependencies) {
    LOGGER.debug("Resolving {}", resolveContext);
    validateResolutionStrategy(resolveContext.getResolutionStrategy());
    ComponentResolversChain resolvers = createResolvers(resolveContext, repositories, metadataHandler, artifactTypeRegistry, consumerSchema);
    DependencyGraphBuilder builder = createDependencyGraphBuilder(resolvers, resolveContext.getResolutionStrategy(), metadataHandler, edgeFilter, consumerSchema, moduleExclusions, buildOperationExecutor);
    DependencyGraphVisitor artifactsGraphVisitor = new ResolvedArtifactsGraphVisitor(artifactsVisitor, resolvers.getArtifactSelector());
    // Resolve the dependency graph
    builder.resolve(resolveContext, new CompositeDependencyGraphVisitor(graphVisitor, artifactsGraphVisitor), includeSyntheticDependencies);
}
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.builder.DependencyGraphBuilder) ResolvedArtifactsGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ResolvedArtifactsGraphVisitor) CompositeDependencyGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.CompositeDependencyGraphVisitor)

Aggregations

DependencyGraphBuilder (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder)3 ResolvedArtifactsGraphVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ResolvedArtifactsGraphVisitor)2 CompositeDependencyGraphVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.CompositeDependencyGraphVisitor)2 DependencyGraphVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphVisitor)2 ClientModuleResolver (org.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModuleResolver)1 CachingDependencySubstitutionApplicator (org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.CachingDependencySubstitutionApplicator)1 DefaultDependencySubstitutionApplicator (org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.DefaultDependencySubstitutionApplicator)1 DependencySubstitutionApplicator (org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.DependencySubstitutionApplicator)1 DefaultCapabilitiesConflictHandler (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultCapabilitiesConflictHandler)1 ModuleConflictHandler (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.ModuleConflictHandler)1 ComponentMetaDataResolver (org.gradle.internal.resolve.resolver.ComponentMetaDataResolver)1 DependencyToComponentIdResolver (org.gradle.internal.resolve.resolver.DependencyToComponentIdResolver)1 ResolveContextToComponentResolver (org.gradle.internal.resolve.resolver.ResolveContextToComponentResolver)1