gradle
8.3

# TaskProvider

interface TaskProvider<T : Task?> : NamedDomainObjectProvider<T>

Providers a task of the given type.

#### Parameters

<T>

Task type

## Functions

configure
Link copied to clipboard
abstract fun configure(action: Action<out Any>)
Configures the task with the given action.
flatMap
Link copied to clipboard
abstract fun <S> flatMap(transformer: Transformer<out @Nullable Provider<out S>, out Any>): Provider<S>
forUseAtConfigurationTime
Link copied to clipboard
abstract fun forUseAtConfigurationTime(): Provider<T>
get
Link copied to clipboard
abstract fun get(): T
getName
Link copied to clipboard
abstract fun getName(): String
The task name referenced by this provider.
getOrElse
Link copied to clipboard
abstract fun getOrElse(defaultValue: T): T
getOrNull
Link copied to clipboard
abstract fun getOrNull(): T
getValue
Link copied to clipboard
inline operator fun <T : Any, U : T> NamedDomainObjectProvider<out T>.getValue(thisRef: Any?, property: KProperty<*>): U

Allows a NamedDomainObjectProvider to be used as a property delegate.

invoke
Link copied to clipboard
operator fun <T> NamedDomainObjectProvider<T>.invoke(action: T.() -> Unit)

Allows a NamedDomainObjectProvider to be configured via invocation syntax.

isPresent
Link copied to clipboard
abstract fun isPresent(): Boolean
map
Link copied to clipboard
abstract fun <S> map(transformer: Transformer<out @Nullable S, out Any>): Provider<S>
orElse
Link copied to clipboard
abstract fun orElse(value: T): Provider<T>
zip
Link copied to clipboard
abstract fun <U, R> zip(right: Provider<U>, combiner: BiFunction<out Any, out Any, out @Nullable R>): Provider<R>