Search in sources :

Example 1 with DefaultCapabilitiesConflictHandler

use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultCapabilitiesConflictHandler in project gradle by gradle.

the class DefaultArtifactDependencyResolver method createCapabilitiesConflictHandler.

private DefaultCapabilitiesConflictHandler createCapabilitiesConflictHandler(ResolutionStrategyInternal resolutionStrategy) {
    DefaultCapabilitiesConflictHandler handler = new DefaultCapabilitiesConflictHandler();
    if (resolutionStrategy.getConflictResolution() != ConflictResolution.strict) {
        handler.registerResolver(new UpgradeCapabilityResolver());
        handler.registerResolver(new LastCandidateCapabilityResolver());
    }
    return handler;
}
Also used : DefaultCapabilitiesConflictHandler(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultCapabilitiesConflictHandler) LastCandidateCapabilityResolver(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.LastCandidateCapabilityResolver) UpgradeCapabilityResolver(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.UpgradeCapabilityResolver)

Example 2 with DefaultCapabilitiesConflictHandler

use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultCapabilitiesConflictHandler in project gradle by gradle.

the class DefaultArtifactDependencyResolver method createCapabilitiesConflictHandler.

private DefaultCapabilitiesConflictHandler createCapabilitiesConflictHandler(CapabilitiesResolutionInternal capabilitiesResolutionRules) {
    DefaultCapabilitiesConflictHandler handler = new DefaultCapabilitiesConflictHandler();
    handler.registerResolver(new UserConfiguredCapabilityResolver(capabilitiesResolutionRules));
    // handler.registerResolver(new UpgradeCapabilityResolver());
    handler.registerResolver(new LastCandidateCapabilityResolver());
    handler.registerResolver(new RejectRemainingCandidates());
    return handler;
}
Also used : UserConfiguredCapabilityResolver(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.UserConfiguredCapabilityResolver) DefaultCapabilitiesConflictHandler(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultCapabilitiesConflictHandler) LastCandidateCapabilityResolver(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.LastCandidateCapabilityResolver) RejectRemainingCandidates(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.RejectRemainingCandidates)

Example 3 with DefaultCapabilitiesConflictHandler

use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultCapabilitiesConflictHandler 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)

Aggregations

DefaultCapabilitiesConflictHandler (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultCapabilitiesConflictHandler)3 LastCandidateCapabilityResolver (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.LastCandidateCapabilityResolver)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 DependencyGraphBuilder (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder)1 ModuleConflictHandler (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.ModuleConflictHandler)1 RejectRemainingCandidates (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.RejectRemainingCandidates)1 UpgradeCapabilityResolver (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.UpgradeCapabilityResolver)1 UserConfiguredCapabilityResolver (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.UserConfiguredCapabilityResolver)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