use of org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.conflicts.VersionConflictResolutionDetails in project gradle by gradle.
the class SelectorStateResolver method resolveConflicts.
private T resolveConflicts(Collection<T> candidates) {
// Do conflict resolution to choose the best out of current selection and candidate.
ConflictResolverDetails<T> details = new DefaultConflictResolverDetails<>(candidates);
conflictResolver.select(details);
T selected = details.getSelected();
if (details.hasFailure()) {
throw UncheckedException.throwAsUncheckedException(details.getFailure());
} else {
ComponentSelectionDescriptorInternal desc = ComponentSelectionReasons.CONFLICT_RESOLUTION;
selected.addCause(desc.withDescription(new VersionConflictResolutionDetails(candidates)));
}
return selected;
}
Aggregations