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.

getByPath

abstract fun getByPath(path: String): Task(source)

Locates a task by path. You can supply a task name, a relative path, or an absolute path. Relative paths are interpreted relative to the project for this container. This method throws an exception if no task with the given path exists.

Return

The task. Never returns null

Since

0.7

Parameters

path

the path of the task to be returned

Throws

If no task with the given path exists.