use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultConflictHandler 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());
}
use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.DefaultConflictHandler in project gradle by gradle.
the class DefaultArtifactDependencyResolver method createModuleConflictHandler.
private ModuleConflictHandler createModuleConflictHandler(ResolutionStrategyInternal resolutionStrategy, GlobalDependencyResolutionRules metadataHandler) {
ConflictResolution conflictResolution = resolutionStrategy.getConflictResolution();
ModuleConflictResolver<ComponentState> conflictResolver = new ConflictResolverFactory(versionComparator, versionParser).createConflictResolver(conflictResolution);
return new DefaultConflictHandler(conflictResolver, metadataHandler.getModuleMetadataProcessor().getModuleReplacements());
}
Aggregations