Allows replacing dependencies with other dependencies.
// add dependency substitution rules dependencySubstitution { //specifying a fixed version for all libraries with 'org.gradle' group eachModule { ModuleDependencySubstitution details -> if (details.requested.group == 'org.gradle') { details.useVersion '2.4' } //changing 'groovy-all' into 'groovy': if (details.requested.name == 'groovy-all') { details.useTarget group: details.requested.group, name: 'groovy', version: details.requested.version } } }
Type | Name and description |
---|---|
DependencySubstitutions |
all(Action<? super DependencySubstitution<? super ComponentSelector>> rule) Adds a dependency substitution rule that is triggered for every dependency (including transitive) when the configuration is being resolved. |
DependencySubstitutions |
all(Closure<?> rule) Adds a dependency substitution rule that is triggered for every dependency (including transitive) when the configuration is being resolved. |
DependencySubstitutions |
eachModule(Action<? super ModuleDependencySubstitution> rule) Adds a dependency substitution rule that is triggered for every module dependency (including transitive) when the configuration is being resolved. |
DependencySubstitutions |
eachModule(Closure<?> rule) Adds a dependency substitution rule that is triggered for every module dependency (including transitive) when the configuration is being resolved. |
DependencySubstitutions |
eachProject(Action<? super ProjectDependencySubstitution> rule) Adds a dependency substitution rule that is triggered for every project dependency (including transitive) when the configuration is being resolved. |
DependencySubstitutions |
eachProject(Closure<?> rule) Adds a dependency substitution rule that is triggered for every project dependency (including transitive) when the configuration is being resolved. |
DependencySubstitutions |
withModule(Object id, Action<? super ModuleDependencySubstitution> rule) Adds a dependency substitution rule that is triggered for a given module dependency (including transitive) when the configuration is being resolved. |
DependencySubstitutions |
withModule(Object id, Closure<?> rule) Adds a dependency substitution rule that is triggered for a given module dependency (including transitive) when the configuration is being resolved. |
DependencySubstitutions |
withProject(Object id, Action<? super ProjectDependencySubstitution> rule) Adds a dependency substitution rule that is triggered for a given project dependency (including transitive) when the configuration is being resolved. |
DependencySubstitutions |
withProject(Object id, Closure<?> rule) Adds a dependency substitution rule that is triggered for a given project dependency (including transitive) when the configuration is being resolved. |
Adds a dependency substitution rule that is triggered for every dependency (including transitive) when the configuration is being resolved. The action receives an instance of DependencySubstitution<ComponentSelector> that can be used to find out what dependency is being resolved and to influence the resolution process. The rules are evaluated in order they are declared. Rules are evaluated after forced modules are applied (see ResolutionStrategy.force
Adds a dependency substitution rule that is triggered for every dependency (including transitive) when the configuration is being resolved. The action receives an instance of DependencySubstitution<ComponentSelector> that can be used to find out what dependency is being resolved and to influence the resolution process. The rules are evaluated in order they are declared. Rules are evaluated after forced modules are applied (see ResolutionStrategy.force
Adds a dependency substitution rule that is triggered for every module dependency (including transitive) when the configuration is being resolved. The action receives an instance of ModuleDependencySubstitution that can be used to find out what dependency is being resolved and to influence the resolution process. The rules are evaluated in order they are declared. Rules are evaluated after forced modules are applied (see ResolutionStrategy.force
Adds a dependency substitution rule that is triggered for every module dependency (including transitive) when the configuration is being resolved. The action receives an instance of ModuleDependencySubstitution that can be used to find out what dependency is being resolved and to influence the resolution process. The rules are evaluated in order they are declared. Rules are evaluated after forced modules are applied (see ResolutionStrategy.force
Adds a dependency substitution rule that is triggered for every project dependency (including transitive) when the configuration is being resolved. The action receives an instance of ProjectDependencySubstitution that can be used to find out what dependency is being resolved and to influence the resolution process. The rules are evaluated in order they are declared. Rules are evaluated after forced modules are applied (see ResolutionStrategy.force
Adds a dependency substitution rule that is triggered for every project dependency (including transitive) when the configuration is being resolved. The action receives an instance of ProjectDependencySubstitution that can be used to find out what dependency is being resolved and to influence the resolution process. The rules are evaluated in order they are declared. Rules are evaluated after forced modules are applied (see ResolutionStrategy.force
Adds a dependency substitution rule that is triggered for a given module dependency (including transitive) when the configuration is being resolved. The action receives an instance of ModuleDependencySubstitution that can be used to find out what dependency is being resolved and to influence the resolution process. The rules are evaluated in order they are declared. Rules are evaluated after forced modules are applied (see ResolutionStrategy.force
Adds a dependency substitution rule that is triggered for a given module dependency (including transitive) when the configuration is being resolved. The action receives an instance of ModuleDependencySubstitution that can be used to find out what dependency is being resolved and to influence the resolution process. The rules are evaluated in order they are declared. Rules are evaluated after forced modules are applied (see ResolutionStrategy.force
Adds a dependency substitution rule that is triggered for a given project dependency (including transitive) when the configuration is being resolved. The action receives an instance of ProjectDependencySubstitution that can be used to find out what dependency is being resolved and to influence the resolution process. The rules are evaluated in order they are declared. Rules are evaluated after forced modules are applied (see ResolutionStrategy.force
Adds a dependency substitution rule that is triggered for a given project dependency (including transitive) when the configuration is being resolved. The action receives an instance of ProjectDependencySubstitution that can be used to find out what dependency is being resolved and to influence the resolution process. The rules are evaluated in order they are declared. Rules are evaluated after forced modules are applied (see ResolutionStrategy.force