For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

DependencySubstitution

Provides means to substitute a different dependency during resolution.

Since

2.4

Functions

Link copied to clipboard
Configures the artifact selection for the substitution.
Link copied to clipboard
The requested dependency, before it is resolved.
Link copied to clipboard
abstract fun useTarget(notation: Any)
abstract fun useTarget(notation: Any, reason: String)
This method can be used to replace a dependency before it is resolved, e.g.