gradle
8.4

# modify

fun modify(dependencyNotation: CharSequence): ExternalModuleDependency(source)

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

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

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

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

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

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

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.

The dependency will be copied, so the original dependency will not be modified.

#### Return

the modified dependency

#### Parameters

dependency

the dependency to modify

<D>

the type of the ModuleDependency