Search in sources :

Example 1 with DefaultVersionComparator

use of org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionComparator in project gradle by gradle.

the class DefaultMutableVersionConstraint method doStrict.

private void doStrict() {
    // When strict version is used, we need to parse the preferred selector early, in order to compute its complement.
    // Hopefully this shouldn't happen too often. If it happens to become a performance problem, we need to reconsider
    // how we compute the "reject" clause
    DefaultVersionSelectorScheme versionSelectorScheme = new DefaultVersionSelectorScheme(new DefaultVersionComparator());
    VersionSelector preferredSelector = versionSelectorScheme.parseSelector(prefer);
    VersionSelector rejectedSelector = versionSelectorScheme.complementForRejection(preferredSelector);
    this.rejects.clear();
    this.rejects.add(rejectedSelector.getSelector());
}
Also used : DefaultVersionComparator(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionComparator) DefaultVersionSelectorScheme(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionSelectorScheme) VersionSelector(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.VersionSelector)

Aggregations

DefaultVersionComparator (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionComparator)1 DefaultVersionSelectorScheme (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionSelectorScheme)1 VersionSelector (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.VersionSelector)1