Provides means to substitute a different dependency during resolution.
- the type of the requested component.Type | Name and description |
---|---|
T |
getRequested() The dependency, before it is resolved. |
void |
useTarget(Object notation) This method can be used to replace a dependency before it is resolved, e.g. change group, name or version (or all three of them), or replace it with a project dependency. |
The dependency, before it is resolved. The requested dependency does not change even if there are multiple dependency substitution rules that manipulate the dependency metadata.
This method can be used to replace a dependency before it is resolved, e.g. change group, name or version (or all three of them), or replace it with a project dependency.
notation
- the notation that gets parsed into an instance of ComponentSelector.
You can pass Strings like 'org.gradle:gradle-core:2.4',
Maps like [group: 'org.gradle', name: 'gradle-core', version: '2.4'],
Projects like project(":api")
,
or instances of ModuleComponentSelector
.