Search in sources :

Example 6 with DefaultMutableVersionConstraint

use of org.gradle.api.internal.artifacts.dependencies.DefaultMutableVersionConstraint in project gradle by gradle.

the class AbstractDependencyMetadataAdapter method version.

@Override
public T version(Action<? super MutableVersionConstraint> configureAction) {
    DefaultMutableVersionConstraint mutableVersionConstraint = new DefaultMutableVersionConstraint(getVersionConstraint());
    configureAction.execute(mutableVersionConstraint);
    ModuleDependencyMetadata dependencyMetadata = getOriginalMetadata().withRequestedVersion(mutableVersionConstraint);
    updateMetadata(dependencyMetadata);
    return Cast.uncheckedCast(this);
}
Also used : DefaultMutableVersionConstraint(org.gradle.api.internal.artifacts.dependencies.DefaultMutableVersionConstraint) ModuleDependencyMetadata(org.gradle.internal.component.external.model.ModuleDependencyMetadata)

Aggregations

DefaultMutableVersionConstraint (org.gradle.api.internal.artifacts.dependencies.DefaultMutableVersionConstraint)6 ImmutableVersionConstraint (org.gradle.api.internal.artifacts.ImmutableVersionConstraint)3 DefaultImmutableVersionConstraint (org.gradle.api.internal.artifacts.dependencies.DefaultImmutableVersionConstraint)2 ModuleVersionIdentifier (org.gradle.api.artifacts.ModuleVersionIdentifier)1 MutableVersionConstraint (org.gradle.api.artifacts.MutableVersionConstraint)1 ModuleComponentSelector (org.gradle.api.artifacts.component.ModuleComponentSelector)1 DefaultMinimalDependency (org.gradle.api.internal.artifacts.dependencies.DefaultMinimalDependency)1 DefaultPluginDependency (org.gradle.api.internal.artifacts.dependencies.DefaultPluginDependency)1 DefaultModuleComponentSelector (org.gradle.internal.component.external.model.DefaultModuleComponentSelector)1 ModuleDependencyMetadata (org.gradle.internal.component.external.model.ModuleDependencyMetadata)1