orEnvSystemGradlePropertyChain

open fun <T : Any> GLazy<T>.orEnvSystemGradlePropertyChain(envKey: String, systemKey: String = envKey.lowercase().replace("_", "."), gradleKey: String = systemKey, converter: (String) -> T): GLazy<T>

Registers a new GLazy fallback that will look up an env variable then system property and finally gradle property if base value is missing.

Receiver

GLazy providing base value

Return

chained GLazy that falls back to property chain lookup

Parameters

envKey

to look up environment variable by

systemKey

to look up system property by, defaults to lowercase envKey with _ replaced to .

gradleKey

to look up gradle property by, systemKey

converter

to apply when converting retrieved property value to expected type


open fun GLazy<String>.orEnvSystemGradlePropertyChain(envKey: String, systemKey: String = envKey.lowercase().replace("_", "."), gradleKey: String = systemKey): GLazy<String>

Registers a new GLazy fallback that will look up an env variable then system property and finally gradle property if base value is missing.

Receiver

GLazy providing base value

Return

chained GLazy that falls back to property chain lookup

Parameters

envKey

to look up environment variable by

systemKey

to look up system property by, defaults to lowercase envKey with _ replaced to .

gradleKey

to look up gradle property by, systemKey


open infix fun GLazy<String>.orEnvSystemGradlePropertyChain(envKey: String): GLazy<String>

Registers a new GLazy fallback that will look up an env variable then system property and finally gradle property if base value is missing. System key is implied as [envKey].lowercase().replace("_", ".") Gradle key is implied as [envKey].lowercase().replace("_", ".")

Receiver

GLazy providing base value

Return

chained GLazy that falls back to property chain lookup

Parameters

envKey

to look up environment variable by and build other keys from