gradle
8.4

# environmentVariable

abstract fun environmentVariable(variableName: String): Provider<String>(source)

Creates a Provider whose value is fetched from the environment variable with the given name.

#### Return

The provider. Never returns null.

#### Parameters

variableName

The name of the environment variable.

abstract fun environmentVariable(variableName: Provider<String>): Provider<String>(source)

Creates a Provider whose value is fetched from the environment variable with the given name.

#### Return

The provider. Never returns null.

#### Parameters

variableName

The provider for the name of the environment variable; when the given provider has no value, the returned provider has no value.