gradle
8.2

# modify

open fun modify(dependencyNotation: CharSequence): ExternalModuleDependency

Create an ExternalModuleDependency from the given notation and modifies it to select the variant of the given module as described in modify.

#### Return

the modified dependency

#### Parameters

dependencyNotation

the dependency notation

#### See also

DependencyFactory

open fun modify(providerConvertibleToDependency: ProviderConvertible<out MinimalExternalModuleDependency>): Provider<out MinimalExternalModuleDependency>

Takes a given `Provider` to a MinimalExternalModuleDependency and modifies the dependency to select the variant of the given module as described in modify.

#### Return

a provider to the modified dependency

#### Parameters

providerConvertibleToDependency

the provider

open fun <D : ModuleDependency?> modify(providerToDependency: Provider<D>): Provider<D>

Takes a given `Provider` to a ExternalModuleDependency and modifies the dependency to select the variant of the given module as described in modify.

#### Return

a provider to the modified dependency

#### Parameters

providerToDependency

the provider

abstract fun <D : ModuleDependency?> modify(dependency: D): D

Takes a given ModuleDependency and modifies the dependency to select the variant of the given module. Dependency resolution may fail if the given module does not have a compatible variant.

#### Return

the modified dependency

#### Parameters

dependency

the dependency to modify

<D>

the type of the ModuleDependency