# DependencyModifier

@NonExtensible
abstract class DependencyModifier(source)

A `DependencyModifier` defines how to modify a dependency inside a custom `dependencies` block to select a different variant.

#### Since

8.0

#### Inheritors

TestFixturesDependencyModifier
PlatformDependencyModifier
EnforcedPlatformDependencyModifier

## Functions

modify
Link copied to clipboard
fun <D : ModuleDependency?> modify(dependency: D): D
Takes a given ModuleDependency and modifies the dependency to select the variant of the given module.
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.
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.
@Incubating
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.