vcsRoot

fun vcsRoot(root: VcsRoot)

Registers the specified VCS root in this project

Example. Add Git VCS Root.

project {
// ...
vcsRoot(MyVcsRoot)
}

object MyVcsRoot: GitVcsRoot({
name = "My project main repository"
url = "<repository URL>"
branch = "refs/heads/main"
checkoutPolicy = AgentCheckoutPolicy.USE_MIRRORS
authMethod = uploadedKey {
uploadedKey = "<SSH key name>"
}
})

See also

Parameters

root

VCS root to register


fun vcsRoot(init: VcsRoot.() -> Unit): VcsRoot

Registers a new VCS root initialized with specified init build in this project

Return

added VCS root

See also

Parameters

init

initialization block