# Interface SourceControl

@ServiceScope(org.gradle.internal.service.scopes.Scope.Settings.class) public interface SourceControl
Configuration that defines the source dependencies available in this build.

To add source dependencies to a build, you call the `gitRepository(URI)` or `gitRepository(URI, Action)` methods to define each Git repository that Gradle should use to locate dependencies as they are required. See `VersionControlRepository` for more details.

If you need to use more sophisticated mappings to control the resolution of source dependencies, you can use the `getVcsMappings()` or `vcsMappings(Action)` methods.

Since:
  4.4

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VcsMappings`
  `getVcsMappings()`
  Returns the VCS mappings configuration.
  `VersionControlRepository`
  `gitRepository(URI url)`
  Registers a Git repository that contains some components that should be used as source dependencies.
  `void`
  `gitRepository(URI url, Action<? super VersionControlRepository> configureAction)`
  Registers a Git repository that contains some components that should be used as dependencies.
  `void`
  `vcsMappings(Action<? super VcsMappings> configuration)`
  Configures VCS mappings.

- ## Method Details

  - ### vcsMappings

    void vcsMappings(Action<? super VcsMappings> configuration)
    Configures VCS mappings.

  - ### getVcsMappings

    VcsMappings getVcsMappings()
    Returns the VCS mappings configuration.

  - ### gitRepository

    VersionControlRepository gitRepository(URI url)
    Registers a Git repository that contains some components that should be used as source dependencies.

    A Git repository can safely be registered multiple times.

    Parameters:
      `url` - The URL of the Git repository.
    Returns:
      An object that can be used to configure the details of the repository.
    Since:
      4.10

  - ### gitRepository

    void gitRepository(URI url, Action<? super VersionControlRepository> configureAction)
    Registers a Git repository that contains some components that should be used as dependencies.

    A Git repository can safely be registered multiple times.

    Parameters:
      `url` - The URL of the Git repository.
      `configureAction` - An action to use to configure the repository.
    Since:
      4.10