api / org.gradle.api.artifacts.maven / Conf2ScopeMappingContainer / addMapping

addMapping

abstract fun addMapping(priority: Int, configuration: Configuration, scope: String): Conf2ScopeMappingContainer

Specifies that dependencies of a certain configuration should be mapped against a certain Maven scope. A configuration can be mapped to one and only one scope. If this method is called more than once for a particular configuration, the last call wins.

See #getMapping(java.util.Collection) for the rules how a scope is choosen from a set of mappings.

Parameters

priority - a number that is used for comparison with the priority of other scopes.

configuration - a Gradle configuration name (must not be null).

scope - A Maven scope name (must not be null)

Return
this

See Also
#getMapping(java.util.Collection)