named

abstract fun named(nameFilter: Spec<String>): TaskCollection<T>(source)


abstract fun named(name: String): TaskProvider<T>(source)

Locates a task by name, without triggering its creation or configuration, failing if there is no such object.

Return

A Provider that will return the task when queried. The task may be created and configured at this point, if not already.

Since

4.9

Parameters

name

The task name

Throws

If a task with the given name is not defined.


abstract fun named(name: String, configurationAction: Action<in T>): TaskProvider<T>(source)

Locates a object by name, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider.

This method is lazy and will not cause the returned element to be realized.

Since

5.0


abstract fun <S : T?> named(name: String, type: Class<S>): TaskProvider<S>(source)

Locates a object by name and type, failing if there is no such object.

This method is lazy and will not cause the returned element to be realized.

Since

5.0


abstract fun <S : T?> named(name: String, type: Class<S>, configurationAction: Action<in S>): TaskProvider<S>(source)

Locates a object by name and type, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider.

This method is lazy and will not cause the returned element to be realized.

Since

5.0