Package org.gradle.vcs

# Interface VcsMappings

public 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}")
             }
           }
         }
       }
     }

Since:
  4.4

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VcsMappings`
  `all(Action<? super VcsMapping> rule)`
  Adds a mapping rule that may define VCS information for any dependency.
  `VcsMappings`
  `withModule(String module, Action<? super VcsMapping> rule)`
  Adds a mapping rule that may define VCS information for the given module.

- ## Method Details

  - ### all

    VcsMappings all(Action<? super VcsMapping> rule)
    Adds a mapping rule that may define VCS information for any dependency. The supplied action is executed for all components.
    Since:
      4.6

  - ### withModule

    VcsMappings withModule(String module, Action<? super VcsMapping> rule)
    Adds a mapping rule that may define VCS information for the given module. The supplied action is executed when the given module is required.
    Parameters:
      `module` - The module to apply the rule to, in the form "group:module".