api / org.gradle.api.provider / ProviderFactory / provider

provider

abstract fun <T : Any> provider(value: Callable<out T>): Provider<T>

Creates a Provider whose value is calculated using the given Callable.

The provider is live and will call the Callable each time its value is queried. The Callable may return null, in which case the provider is considered to have no value.

Parameters

value - The java.util.concurrent.Callable use to calculate the value.

Return
The provider. Never returns null.