use Target
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. Accepted notations are:
- Strings encoding group:module:version, like 'org.gradle:gradle-core:2.4'
- Maps like [group: 'org.gradle', name: 'gradle-core', version: '2.4']
- Project instances like
project(":api")
- Any instance of
ModuleComponentSelector
orProjectComponentSelector
Parameters
notation
the notation that gets parsed into an instance of ComponentSelector.
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 and provides a human readable reason for diagnostics. Accepted notations are:
- Strings encoding group:module:version, like 'org.gradle:gradle-core:2.4'
- Maps like [group: 'org.gradle', name: 'gradle-core', version: '2.4']
- Project instances like
project(":api")
- Any instance of
ModuleComponentSelector
orProjectComponentSelector
Since
4.5
Parameters
notation
the notation that gets parsed into an instance of ComponentSelector.