# VcsMappings

@ServiceScope(value = Settings::class)
interface VcsMappings(source)

Allows VCS mapping rules to be specified for a build. A VCS mapping rule is responsible for calculating the VCS information for a particular dependency. In settings.gradle:

    sourceControl {
      vcsMappings {
        withModule("org.gradle:gradle") {
          from(GitVersionControlSpec) {
            url = uri("https://github.com/gradle/gradle")
          }
        }
        all { details ->
          if (details.requested.group == "org.gradle") {
            from(GitVersionControlSpec) {
              url = uri("https://github.com/gradle/${details.requested.module}")
            }
          }
        }
      }
    }

Content copied to clipboard

#### Since

4.4

## Functions

all
Link copied to clipboard
abstract fun all(rule: Action<in VcsMapping>): VcsMappings
Adds a mapping rule that may define VCS information for any dependency.
withModule
Link copied to clipboard
abstract fun withModule(module: String, rule: Action<in VcsMapping>): VcsMappings
Adds a mapping rule that may define VCS information for the given module.