@Incubating public interface SourceControl
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.
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.
|
void vcsMappings(Action<? super VcsMappings> configuration)
VcsMappings getVcsMappings()
VersionControlRepository gitRepository(URI url)
A Git repository can safely be registered multiple times.
url
- The URL of the Git repository.void gitRepository(URI url, Action<? super VersionControlRepository> configureAction)
A Git repository can safely be registered multiple times.
url
- The URL of the Git repository.configureAction
- An action to use to configure the repository.