@Incubating public interface ModuleDependencySubstitution extends DependencySubstitution<ModuleComponentSelector>
Modifier and Type | Method and Description |
---|---|
void |
useVersion(String version)
Allows to override the version when the dependency
DependencySubstitution.getRequested() is resolved. |
getRequested, useTarget
void useVersion(String version)
DependencySubstitution.getRequested()
is resolved.
Can be used to select a version that is different than requested.
Forcing modules via ResolutionStrategy.force(Object...)
uses this capability.
If you need to change not only the version but also group or name please use the DependencySubstitution.useTarget(Object)
method.
version
- to use when resolving this dependency, cannot be null.
It is valid to configure the same version as requested.