For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

orElse

abstract fun orElse(value: T): Provider<T>(source)

Returns a Provider whose value is the value of this provider, if present, otherwise the given default value.

Since

5.6

Parameters

value

The default value to use when this provider has no value.


abstract fun orElse(provider: Provider<out T>): Provider<T>(source)

Returns a Provider whose value is the value of this provider, if present, otherwise uses the value from the given provider, if present.

Since

5.6

Parameters

provider

The provider whose value should be used when this provider has no value.