Provider Factory
A factory for creating instances of Provider.
An instance of the factory can be injected into a task, plugin or other object by annotating a public constructor or property getter method with javax.inject.Inject
. It is also available via getProviders and getProviders.
Since
4.0
Functions
Link copied to clipboard
abstract fun <T : Credentials?> credentials(credentialsType: Class<T>, identity: String): Provider<T>
abstract fun <T : Credentials?> credentials(credentialsType: Class<T>, identity: Provider<String>): Provider<T>
Creates a Provider for the given Credentials type.
Link copied to clipboard
inline fun <T : Credentials> ProviderFactory.credentials(credentialsType: KClass<T>, identity: String): Provider<T>
inline fun <T : Credentials> ProviderFactory.credentials(credentialsType: KClass<T>, identity: Provider<String>): Provider<T>
Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.provider.ProviderFactory.credentials.
Link copied to clipboard
Creates a Provider whose value is fetched from the environment variable with the given name.
Link copied to clipboard
abstract fun environmentVariablesPrefixedBy(variableNamePrefix: String): Provider<Map<String, String>>
abstract fun environmentVariablesPrefixedBy(variableNamePrefix: Provider<String>): Provider<Map<String, String>>
Creates a Provider whose value is a name-to-value map of the environment variables with the names starting with the given prefix.
Link copied to clipboard
Allows lazy access to the output of the external process.
Link copied to clipboard
Allows lazy access to the contents of the given file.
Link copied to clipboard
Creates a Provider whose value is fetched from the Gradle property of the given name.
Link copied to clipboard
Allows lazy access to the output of the external java process.
Link copied to clipboard
abstract fun <T, P : ValueSourceParameters?> of(valueSourceType: Class<out ValueSource<T, P>>, configuration: Action<in ValueSourceSpec<P>>): Provider<T>
Creates a Provider whose value is obtained from the given ValueSource.
Link copied to clipboard
Link copied to clipboard
Creates a Provider whose value is fetched from system properties using the given property name.