api / org.gradle.vcs.git / GitVersionControlSpec

GitVersionControlSpec

@Incubating interface GitVersionControlSpec : VersionControlSpec

A specification of a Git repository.

Since
4.4

Functions

getUrl

abstract fun getUrl(): URI

The URL for the repository in the specification.

Note: The return value is a URI to avoid exposing the full contract of java.net.URL clients of this interface. Specifically, java.net.URL extends URI to add network operations which are both unsuited for simple data specification and allocate additional memory.

setUrl

abstract fun setUrl(url: URI): Unit
abstract fun setUrl(url: String): Unit

Sets the URL of the repository.

Inherited Functions

getRepoName

abstract fun getRepoName(): String

Returns the name of the repository.

getRootDir

abstract fun getRootDir(): String

Returns the relative path to the root of the build within the repository.

Defaults to an empty relative path, meaning the root of the repository.

getUniqueId

abstract fun getUniqueId(): String

Returns a String identifier which will be unique to this version control specification among other version control specifications.

plugins

abstract fun plugins(configuration: Action<in InjectedPluginDependencies>): Unit

Configure injected plugins into this build.

setRootDir

abstract fun setRootDir(rootDir: String): Unit

Sets the relative path to the root of the build within the repository.