api / org.gradle.vcs / VersionControlSpec

VersionControlSpec

@Incubating interface VersionControlSpec : Describable

Captures user-provided information about a version control system.

Since
4.4

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.

Inherited Functions

getDisplayName

abstract fun getDisplayName(): String

Returns the display name of this object. It is strongly encouraged to compute it lazily, and cache the value if it is expensive.

Inheritors

GitVersionControlSpec

interface GitVersionControlSpec : VersionControlSpec

A specification of a Git repository.