use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.TransientConfigurationResultsBuilder in project gradle by gradle.
the class DefaultConfigurationResolver method resolveArtifacts.
public void resolveArtifacts(ConfigurationInternal configuration, ResolverResults results) {
ArtifactResolveState resolveState = (ArtifactResolveState) results.getArtifactResolveState();
ResolvedGraphResults graphResults = resolveState.graphResults;
VisitedArtifactsResults artifactResults = resolveState.artifactsResults;
TransientConfigurationResultsBuilder transientConfigurationResultsBuilder = resolveState.transientConfigurationResultsBuilder;
TransientConfigurationResultsLoader transientConfigurationResultsFactory = new TransientConfigurationResultsLoader(transientConfigurationResultsBuilder, graphResults);
DefaultLenientConfiguration result = new DefaultLenientConfiguration(configuration, cacheLockingManager, graphResults.getUnresolvedDependencies(), artifactResults, resolveState.fileDependencyResults, transientConfigurationResultsFactory, artifactTransforms);
results.artifactsResolved(new DefaultResolvedConfiguration(result, configuration.getAttributes()), result);
}
use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.TransientConfigurationResultsBuilder 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));
}
Aggregations