Interface SourceControl


  • 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 Detail

      • vcsMappings

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

        VcsMappings getVcsMappings()
        Returns the VCS mappings configuration.
      • gitRepository

        VersionControlRepository gitRepository​(java.net.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​(java.net.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