# mapToMavenScope

abstract fun mapToMavenScope(scope: String)(source)

Provides information about how to publish to a Maven POM file. If nothing is said, Gradle will publish all dependencies from this configuration to the compile scope. It is preferable to give a mapping in order for consumers to get the right dependencies when asking for the API or the runtime of a component published as a POM file only. Note that Gradle will write Maven scopes in the following order:

- compile dependencies
- runtime dependencies
- optional compile dependencies
- optional runtime dependencies

The mapping only applies to dependencies: dependency constraints will systematically be published as import scope.

#### Parameters

scope

the Maven scope to use for dependencies found in this configuration variant