# variantOf

abstract fun variantOf(dependencyProvider: Provider<MinimalExternalModuleDependency>, variantSpec: Action<in ExternalModuleDependencyVariantSpec>): Provider<MinimalExternalModuleDependency>

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

open fun variantOf(dependencyProviderConvertible: ProviderConvertible<MinimalExternalModuleDependency>, variantSpec: Action<in ExternalModuleDependencyVariantSpec>): Provider<MinimalExternalModuleDependency>

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