# dependencySubstitution

abstract fun dependencySubstitution(action: Action<in DependencySubstitutions>): ResolutionStrategy(source)

Configures the set of dependency substitution rules for this configuration. The action receives an instance of DependencySubstitutions which can then be configured with substitution rules.

Examples:

    // add dependency substitution rules
    configurations.all {
      resolutionStrategy.dependencySubstitution {
        // Substitute project and module dependencies
        substitute module('org.gradle:api') using project(':api')
        substitute project(':util') using module('org.gradle:util:3.0')

        // Substitute one module dependency for another
        substitute module('org.gradle:api:2.0') using module('org.gradle:api:2.1')
      }
    }

Content copied to clipboard

#### Return

this ResolutionStrategy instance

#### Since

2.5

#### See also

DependencySubstitutions