Search in sources :

Example 1 with StrictConflictResolution

use of org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.StrictConflictResolution in project gradle by gradle.

the class DefaultArtifactDependencyResolver method createConflictHandler.

private ConflictHandler createConflictHandler(ResolutionStrategyInternal resolutionStrategy, GlobalDependencyResolutionRules metadataHandler) {
    ModuleConflictResolver conflictResolver;
    ConflictResolution conflictResolution = resolutionStrategy.getConflictResolution();
    if (conflictResolution instanceof StrictConflictResolution) {
        conflictResolver = new StrictConflictResolver();
    } else {
        conflictResolver = new LatestModuleConflictResolver(versionComparator);
        if (conflictResolution instanceof PreferProjectModulesConflictResolution) {
            conflictResolver = new ProjectDependencyForcingResolver(conflictResolver);
        }
    }
    conflictResolver = new VersionSelectionReasonResolver(conflictResolver);
    return new DefaultConflictHandler(conflictResolver, metadataHandler.getModuleMetadataProcessor().getModuleReplacements());
}
Also used : StrictConflictResolution(org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.StrictConflictResolution) DefaultConflictHandler(org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultConflictHandler) StrictConflictResolution(org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.StrictConflictResolution) ConflictResolution(org.gradle.api.internal.artifacts.configurations.ConflictResolution) PreferProjectModulesConflictResolution(org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.PreferProjectModulesConflictResolution) PreferProjectModulesConflictResolution(org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.PreferProjectModulesConflictResolution)

Aggregations

ConflictResolution (org.gradle.api.internal.artifacts.configurations.ConflictResolution)1 PreferProjectModulesConflictResolution (org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.PreferProjectModulesConflictResolution)1 StrictConflictResolution (org.gradle.api.internal.artifacts.ivyservice.resolutionstrategy.StrictConflictResolution)1 DefaultConflictHandler (org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultConflictHandler)1