use of org.gradle.internal.resolve.resolver.ComponentMetaDataResolver in project gradle by gradle.
the class DefaultArtifactDependencyResolver method createDependencyGraphBuilder.
private DependencyGraphBuilder createDependencyGraphBuilder(ComponentResolvers componentSource, ResolutionStrategyInternal resolutionStrategy, GlobalDependencyResolutionRules globalRules, Spec<? super DependencyMetadata> edgeFilter, AttributesSchema attributesSchema, ImmutableModuleIdentifierFactory moduleIdentifierFactory, ModuleExclusions moduleExclusions) {
DependencyToComponentIdResolver componentIdResolver = new DependencySubstitutionResolver(componentSource.getComponentIdResolver(), resolutionStrategy.getDependencySubstitutionRule());
ComponentMetaDataResolver componentMetaDataResolver = new ClientModuleResolver(componentSource.getComponentResolver(), dependencyDescriptorFactory);
ResolveContextToComponentResolver requestResolver = createResolveContextConverter();
ConflictHandler conflictHandler = createConflictHandler(resolutionStrategy, globalRules);
return new DependencyGraphBuilder(componentIdResolver, componentMetaDataResolver, requestResolver, conflictHandler, edgeFilter, attributesSchema, moduleIdentifierFactory, moduleExclusions);
}
use of org.gradle.internal.resolve.resolver.ComponentMetaDataResolver 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);
}
use of org.gradle.internal.resolve.resolver.ComponentMetaDataResolver in project gradle by gradle.
the class DefaultArtifactResolutionQuery method execute.
@Override
public ArtifactResolutionResult execute() {
if (componentType == null) {
throw new IllegalStateException("Must specify component type and artifacts to query.");
}
List<? extends ResolutionAwareRepository> repositories = repositoriesSupplier.get();
ConfigurationInternal detachedConfiguration = configurationContainer.detachedConfiguration();
ResolutionStrategyInternal resolutionStrategy = detachedConfiguration.getResolutionStrategy();
ComponentResolvers componentResolvers = ivyFactory.create(detachedConfiguration.getName(), resolutionStrategy, repositories, metadataHandler.getComponentMetadataProcessorFactory(), ImmutableAttributes.EMPTY, null, attributesFactory, componentMetadataSupplierRuleExecutor);
ComponentMetaDataResolver componentMetaDataResolver = componentResolvers.getComponentResolver();
ArtifactResolver artifactResolver = new ErrorHandlingArtifactResolver(componentResolvers.getArtifactResolver());
return createResult(componentMetaDataResolver, artifactResolver);
}
Aggregations