use Target
Allows to override the details of the dependency (see getTarget) when it is resolved (see getRequested). This method can be used to change the dependency before it is resolved, e.g. change group, name or version (or all three of them). In many cases users are interested in changing the version. For such scenario you can use the useVersion method.
It accepts the following notations:
- String in a format of: 'group:name:version', for example: 'org.gradle:gradle-core:1.0'
- Map with keys 'group', 'name' and 'version'; for example: [group: 'org.gradle', name: 'gradle-core', version: '1.0']
- Provider and ProviderConvertible of MinimalExternalModuleDependency
- instance of ExternalDependency
- instance of ModuleComponentSelector
- instance of ModuleVersionSelector (deprecated)
Since
1.5
Parameters
notation
the notation that gets parsed into an instance of ModuleComponentSelector