Search in sources :

Example 1 with LastCandidateCapabilityResolver

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

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

Aggregations

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