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.

variantOf

Allows fine-tuning what variant to select for the target dependency. This can be used to specify a classifier, for example.

Return

a new dependency provider targeting the configured variant

Since

6.8

Parameters

dependencyProvider

the dependency provider

variantSpec

the variant specification


Allows fine-tuning what variant to select for the target dependency. This can be used to specify a classifier, for example.

Return

a new dependency provider targeting the configured variant

Since

7.3

Parameters

dependencyProviderConvertible

the dependency provider convertible that returns the dependency provider

variantSpec

the variant specification