git

fun DefaultLoaders.git(repo: String, file: String, dir: String? = null, branch: String = Constants.HEAD, optional: Boolean = this.optional): Config

Returns a child config containing values from a specified git repository.

Format of the url is auto-detected from the url extension. Supported url formats and the corresponding extensions:

  • HOCON: conf

  • JSON: json

  • Properties: properties

  • TOML: toml

  • XML: xml

  • YAML: yml, yaml

Throws UnsupportedExtensionException if the url extension is unsupported.

Return

a child config containing values from a specified git repository

Parameters

repo

git repository

file

file in the git repository

dir

local directory of the git repository

branch

the initial branch

optional

whether the source is optional

action

additional action when cloning/pulling

Throws

com.uchuhimo.konf.source.UnsupportedExtensionException
fun DefaultProviders.git(repo: String, file: String, dir: String? = null, branch: String = Constants.HEAD, optional: Boolean = false): Source

Returns a source from a specified git repository.

Format of the url is auto-detected from the url extension. Supported url formats and the corresponding extensions:

  • HOCON: conf

  • JSON: json

  • Properties: properties

  • TOML: toml

  • XML: xml

  • YAML: yml, yaml

Throws UnsupportedExtensionException if the url extension is unsupported.

Return

a source from a specified git repository

Parameters

repo

git repository

file

file in the git repository

dir

local directory of the git repository

branch

the initial branch

optional

whether the source is optional

Throws

com.uchuhimo.konf.source.UnsupportedExtensionException
fun Loader.git(repo: String, file: String, dir: String? = null, branch: String = Constants.HEAD, optional: Boolean = this.optional): Config

Returns a child config containing values from a specified git repository.

Return

a child config containing values from a specified git repository

Parameters

repo

git repository

file

file in the git repository

dir

local directory of the git repository

branch

the initial branch

optional

whether the source is optional

fun Provider.git(repo: String, file: String, dir: String? = null, branch: String = Constants.HEAD, optional: Boolean = false): Source

Returns a new source from a specified git repository.

Return

a new source from a specified git repository

Parameters

repo

git repository

file

file in the git repository

dir

local directory of the git repository

branch

the initial branch

optional

whether this source is optional