public interface ComponentModuleMetadataHandler
Example:
dependencies { modules { //Configuring component module metadata for the entire "google-collections" module, // declaring that legacy library was replaced with "guava". //This way, Gradle's conflict resolution can use this information and use "guava" // in case both libraries appear in the same dependency tree. module("com.google.collections:google-collections") { replacedBy("com.google.guava:guava") } } }
Modifier and Type | Method | Description |
---|---|---|
void |
module(Object moduleNotation,
Action<? super ComponentModuleMetadataDetails> rule) |
Enables configuring component module metadata.
|
void module(Object moduleNotation, Action<? super ComponentModuleMetadataDetails> rule)
//declaring that google collections are replaced by guava //so that conflict resolution can take advantage of this information: dependencies.modules.module('com.google.collections:google-collections') { replacedBy('com.google.guava:guava') }
moduleNotation
- an identifier of the module. String "group:name", e.g. 'org.gradle:gradle-core'
or an instance of ModuleIdentifier
rule
- a rule that applies to the components of the specified module