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.

getDependenciesForVariant

Returns the dependencies of a specific variant. It is possible for a component to be selected multiple times with different variants (for example, the main component and its test fixtures). The dependencies of each variant are different, but the method doesn't give access to each variant individual dependencies.

The variant must be a selected variant of this component.

Since

5.6

Parameters

variant

the variant to find the dependencies for

Throws

if the variant is not a selected variant of this component