Search in sources :

Example 1 with DefaultVersionSelectorScheme

use of org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionSelectorScheme 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)

Example 2 with DefaultVersionSelectorScheme

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

the class DependencyManagementBuildScopeServices method createVersionSelectorScheme.

VersionSelectorScheme createVersionSelectorScheme(VersionComparator versionComparator, VersionParser versionParser) {
    DefaultVersionSelectorScheme delegate = new DefaultVersionSelectorScheme(versionComparator, versionParser);
    CachingVersionSelectorScheme selectorScheme = new CachingVersionSelectorScheme(delegate);
    return selectorScheme;
}
Also used : CachingVersionSelectorScheme(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.CachingVersionSelectorScheme) DefaultVersionSelectorScheme(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionSelectorScheme)

Aggregations

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