gradle
8.3

# VcsMappings

interface VcsMappings

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

## Functions

all
Link copied to clipboard
abstract fun all(rule: Action<out Any>): 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<out Any>): VcsMappings
Adds a mapping rule that may define VCS information for the given module.