# environmentVariable

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

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

#### Return

The provider. Never returns null.

#### Since

6.1

#### Parameters

variableName

The name of the environment variable.

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

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

#### Return

The provider. Never returns null.

#### Since

6.1

#### Parameters

variableName

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