Search in sources :

Example 1 with ComponentMetaDataResolver

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);
}
Also used : ComponentMetaDataResolver(org.gradle.internal.resolve.resolver.ComponentMetaDataResolver) ClientModuleResolver(org.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModuleResolver) ConflictHandler(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.ConflictHandler) DefaultConflictHandler(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultConflictHandler) DependencyGraphBuilder(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder) ResolveContextToComponentResolver(org.gradle.internal.resolve.resolver.ResolveContextToComponentResolver) DependencySubstitutionResolver(org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.DependencySubstitutionResolver) DependencyToComponentIdResolver(org.gradle.internal.resolve.resolver.DependencyToComponentIdResolver)

Example 2 with ComponentMetaDataResolver

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);
}
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 ComponentMetaDataResolver

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);
}
Also used : ComponentMetaDataResolver(org.gradle.internal.resolve.resolver.ComponentMetaDataResolver) ErrorHandlingArtifactResolver(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingArtifactResolver) ComponentResolvers(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentResolvers) ResolutionStrategyInternal(org.gradle.api.internal.artifacts.configurations.ResolutionStrategyInternal) ConfigurationInternal(org.gradle.api.internal.artifacts.configurations.ConfigurationInternal) ArtifactResolver(org.gradle.internal.resolve.resolver.ArtifactResolver) ErrorHandlingArtifactResolver(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingArtifactResolver)

Aggregations

ComponentMetaDataResolver (org.gradle.internal.resolve.resolver.ComponentMetaDataResolver)3 ClientModuleResolver (org.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModuleResolver)2 DependencyToComponentIdResolver (org.gradle.internal.resolve.resolver.DependencyToComponentIdResolver)2 ResolveContextToComponentResolver (org.gradle.internal.resolve.resolver.ResolveContextToComponentResolver)2 ConfigurationInternal (org.gradle.api.internal.artifacts.configurations.ConfigurationInternal)1 ResolutionStrategyInternal (org.gradle.api.internal.artifacts.configurations.ResolutionStrategyInternal)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 DependencySubstitutionResolver (org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.DependencySubstitutionResolver)1 ComponentResolvers (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentResolvers)1 ErrorHandlingArtifactResolver (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingArtifactResolver)1 DependencyGraphBuilder (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder)1 DependencyGraphBuilder (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder)1 ConflictHandler (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.ConflictHandler)1 DefaultCapabilitiesConflictHandler (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultCapabilitiesConflictHandler)1 DefaultConflictHandler (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultConflictHandler)1 ModuleConflictHandler (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.ModuleConflictHandler)1 ArtifactResolver (org.gradle.internal.resolve.resolver.ArtifactResolver)1