# replacedBy

abstract fun replacedBy(moduleNotation: Any)

Configures a replacement module for this module. A real world example: 'com.google.collections:google-collections' is replaced by 'com.google.guava:guava'. Subsequent invocations of this method replace the previous 'replacedBy' value. For information and examples please see org.gradle.api.artifacts.dsl.ComponentMetadataHandler.

#### Parameters

moduleNotation

a String like 'com.google.guava:guava', an instance of org.gradle.api.artifacts.ModuleVersionIdentifier, null is not permitted

abstract fun replacedBy(moduleNotation: Any, @Nullable reason: @Nullable String)

Configures a replacement module for this module and provides an explanation for the replacement. A real world example: 'com.google.collections:google-collections' is replaced by 'com.google.guava:guava'. Subsequent invocations of this method replace the previous 'replacedBy' value. For information and examples please see org.gradle.api.artifacts.dsl.ComponentMetadataHandler.

#### Since

4.5

#### Parameters

moduleNotation

a String like 'com.google.guava:guava', an instance of org.gradle.api.artifacts.ModuleVersionIdentifier, null is not permitted

reason

the reason for the replacement, for diagnostics