# substitute

abstract fun substitute(substitutedDependency: ComponentSelector): DependencySubstitutions.Substitution(source)

DSL-friendly mechanism to construct a dependency substitution for dependencies matching the provided selector.

Examples:

    configurations { main }
    configurations.main.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

#### Since

2.5