gradle
8.6

# variantOf

abstract fun variantOf(dependencyProvider: Provider<MinimalExternalModuleDependency>, variantSpec: Action<out Any>): Provider<MinimalExternalModuleDependency>(source)

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

#### Parameters

dependencyProvider

the dependency provider

variantSpec

the variant specification

open fun variantOf(dependencyProviderConvertible: ProviderConvertible<MinimalExternalModuleDependency>, variantSpec: Action<out Any>): Provider<MinimalExternalModuleDependency>(source)

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

#### Parameters

dependencyProviderConvertible

the dependency provider convertible that returns the dependency provider

variantSpec

the variant specification