Search in sources :

Example 1 with FileDependencyCollectingGraphVisitor

use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.result.FileDependencyCollectingGraphVisitor in project gradle by gradle.

the class DefaultConfigurationResolver method resolveGraph.

public void resolveGraph(ConfigurationInternal configuration, ResolverResults results) {
    List<ResolutionAwareRepository> resolutionAwareRepositories = CollectionUtils.collect(repositories, Transformers.cast(ResolutionAwareRepository.class));
    StoreSet stores = storeFactory.createStoreSet();
    BinaryStore oldModelStore = stores.nextBinaryStore();
    Store<TransientConfigurationResults> oldModelCache = stores.oldModelCache();
    TransientConfigurationResultsBuilder oldTransientModelBuilder = new TransientConfigurationResultsBuilder(oldModelStore, oldModelCache, moduleIdentifierFactory);
    DefaultResolvedConfigurationBuilder oldModelBuilder = new DefaultResolvedConfigurationBuilder(oldTransientModelBuilder);
    ResolvedConfigurationDependencyGraphVisitor oldModelVisitor = new ResolvedConfigurationDependencyGraphVisitor(oldModelBuilder);
    BinaryStore newModelStore = stores.nextBinaryStore();
    Store<ResolvedComponentResult> newModelCache = stores.newModelCache();
    StreamingResolutionResultBuilder newModelBuilder = new StreamingResolutionResultBuilder(newModelStore, newModelCache, moduleIdentifierFactory);
    ResolvedLocalComponentsResultGraphVisitor localComponentsVisitor = new ResolvedLocalComponentsResultGraphVisitor();
    DefaultResolvedArtifactsBuilder artifactsBuilder = new DefaultResolvedArtifactsBuilder(buildProjectDependencies, configuration.getResolutionStrategy().getSortOrder(), buildOperationProcessor);
    FileDependencyCollectingGraphVisitor fileDependencyVisitor = new FileDependencyCollectingGraphVisitor(attributesFactory, buildOperationProcessor);
    DependencyGraphVisitor graphVisitor = new CompositeDependencyGraphVisitor(oldModelVisitor, newModelBuilder, localComponentsVisitor, fileDependencyVisitor);
    DependencyArtifactsVisitor artifactsVisitor = new CompositeDependencyArtifactsVisitor(oldModelVisitor, artifactsBuilder);
    resolver.resolve(configuration, resolutionAwareRepositories, metadataHandler, Specs.<DependencyMetadata>satisfyAll(), graphVisitor, artifactsVisitor, attributesSchema, moduleIdentifierFactory, moduleExclusions);
    VisitedArtifactsResults artifactsResults = artifactsBuilder.complete();
    VisitedFileDependencyResults fileDependencyResults = fileDependencyVisitor.complete();
    results.graphResolved(newModelBuilder.complete(), localComponentsVisitor, new BuildDependenciesOnlyVisitedArtifactSet(artifactsResults, fileDependencyResults, artifactTransforms));
    results.retainState(new ArtifactResolveState(oldModelBuilder.complete(), artifactsResults, fileDependencyResults, oldTransientModelBuilder));
}
Also used : TransientConfigurationResultsBuilder(org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.TransientConfigurationResultsBuilder) ResolvedConfigurationDependencyGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.ResolvedConfigurationDependencyGraphVisitor) ResolutionAwareRepository(org.gradle.api.internal.artifacts.repositories.ResolutionAwareRepository) StreamingResolutionResultBuilder(org.gradle.api.internal.artifacts.ivyservice.resolveengine.result.StreamingResolutionResultBuilder) CompositeDependencyGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.CompositeDependencyGraphVisitor) CompositeDependencyArtifactsVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.CompositeDependencyArtifactsVisitor) VisitedArtifactsResults(org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.VisitedArtifactsResults) DefaultResolvedConfigurationBuilder(org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.DefaultResolvedConfigurationBuilder) BuildDependenciesOnlyVisitedArtifactSet(org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.BuildDependenciesOnlyVisitedArtifactSet) DefaultResolvedArtifactsBuilder(org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultResolvedArtifactsBuilder) DependencyGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphVisitor) CompositeDependencyGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.CompositeDependencyGraphVisitor) ResolvedConfigurationDependencyGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.ResolvedConfigurationDependencyGraphVisitor) CompositeDependencyArtifactsVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.CompositeDependencyArtifactsVisitor) DependencyArtifactsVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DependencyArtifactsVisitor) StoreSet(org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.StoreSet) FileDependencyCollectingGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.result.FileDependencyCollectingGraphVisitor) TransientConfigurationResults(org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.TransientConfigurationResults) BinaryStore(org.gradle.api.internal.cache.BinaryStore) VisitedFileDependencyResults(org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.VisitedFileDependencyResults) ResolvedComponentResult(org.gradle.api.artifacts.result.ResolvedComponentResult) ResolvedLocalComponentsResultGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.projectresult.ResolvedLocalComponentsResultGraphVisitor)

Example 2 with FileDependencyCollectingGraphVisitor

use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.result.FileDependencyCollectingGraphVisitor in project gradle by gradle.

the class DefaultConfigurationResolver method resolveBuildDependencies.

@Override
public void resolveBuildDependencies(ConfigurationInternal configuration, ResolverResults result) {
    ResolutionStrategyInternal resolutionStrategy = configuration.getResolutionStrategy();
    FileDependencyCollectingGraphVisitor fileDependenciesVisitor = new FileDependencyCollectingGraphVisitor(attributesFactory, buildOperationProcessor);
    DefaultResolvedArtifactsBuilder artifactsVisitor = new DefaultResolvedArtifactsBuilder(buildProjectDependencies, resolutionStrategy.getSortOrder(), buildOperationProcessor);
    resolver.resolve(configuration, ImmutableList.<ResolutionAwareRepository>of(), metadataHandler, IS_LOCAL_EDGE, fileDependenciesVisitor, artifactsVisitor, attributesSchema, moduleIdentifierFactory, moduleExclusions);
    result.graphResolved(new BuildDependenciesOnlyVisitedArtifactSet(artifactsVisitor.complete(), fileDependenciesVisitor.complete(), artifactTransforms));
}
Also used : DefaultResolvedArtifactsBuilder(org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultResolvedArtifactsBuilder) FileDependencyCollectingGraphVisitor(org.gradle.api.internal.artifacts.ivyservice.resolveengine.result.FileDependencyCollectingGraphVisitor) BuildDependenciesOnlyVisitedArtifactSet(org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.BuildDependenciesOnlyVisitedArtifactSet) ResolutionStrategyInternal(org.gradle.api.internal.artifacts.configurations.ResolutionStrategyInternal)

Aggregations

BuildDependenciesOnlyVisitedArtifactSet (org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.BuildDependenciesOnlyVisitedArtifactSet)2 DefaultResolvedArtifactsBuilder (org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultResolvedArtifactsBuilder)2 FileDependencyCollectingGraphVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.result.FileDependencyCollectingGraphVisitor)2 ResolvedComponentResult (org.gradle.api.artifacts.result.ResolvedComponentResult)1 ResolutionStrategyInternal (org.gradle.api.internal.artifacts.configurations.ResolutionStrategyInternal)1 DependencyArtifactsVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DependencyArtifactsVisitor)1 VisitedArtifactsResults (org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.VisitedArtifactsResults)1 VisitedFileDependencyResults (org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.VisitedFileDependencyResults)1 CompositeDependencyArtifactsVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.CompositeDependencyArtifactsVisitor)1 CompositeDependencyGraphVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.CompositeDependencyGraphVisitor)1 DependencyGraphVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphVisitor)1 DefaultResolvedConfigurationBuilder (org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.DefaultResolvedConfigurationBuilder)1 ResolvedConfigurationDependencyGraphVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.ResolvedConfigurationDependencyGraphVisitor)1 TransientConfigurationResults (org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.TransientConfigurationResults)1 TransientConfigurationResultsBuilder (org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.TransientConfigurationResultsBuilder)1 ResolvedLocalComponentsResultGraphVisitor (org.gradle.api.internal.artifacts.ivyservice.resolveengine.projectresult.ResolvedLocalComponentsResultGraphVisitor)1 StreamingResolutionResultBuilder (org.gradle.api.internal.artifacts.ivyservice.resolveengine.result.StreamingResolutionResultBuilder)1 StoreSet (org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.StoreSet)1 ResolutionAwareRepository (org.gradle.api.internal.artifacts.repositories.ResolutionAwareRepository)1 BinaryStore (org.gradle.api.internal.cache.BinaryStore)1