Configuration key in dependency notation map


(Ross Goldberg) #1

DependencyMapNotationConverter indicates that the Map form of dependency notation accepts a key named configuration.

What is the function of the value for this key?

Is it documented anywhere?

I imagine that it allows you to substitute a specified configuration to use for transitive dependencies of the current dependency instead of using the configuration of the current dependency for transitive dependencies. e.g., I guess that for the following:

dependencies {
    testImplementation group: "com.maas-neotek", name: "biochip", version: "aleph"
    testImplementation group: "com.ono-sendai", name: "cyberspace", version: "7", configuration: "implementation"
}

Gradle will include the testImplementation transitive dependencies for "biochip’, but the implementation transitive dependencies for “cyberspace”.

Is that guess correct?