For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

invoke

operator fun String.invoke(configuration: Task.() -> Unit): TaskProvider<Task>(source)
operator fun <U : Task> String.invoke(type: KClass<U>, configuration: U.() -> Unit): TaskProvider<U>(source)

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

Since

4.10

See also

TaskContainer.named
TaskProvider.configure

operator fun <U : Task> String.invoke(type: KClass<U>): TaskProvider<U>(source)

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

Since

4.10

See also

TaskContainer.named