api / org.gradle.api.tasks / TaskCollection / named

named

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

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

Parameters

name - The task name

Exceptions

UnknownTaskException - If a task with the given name is not defined.

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