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.

forTasks

abstract fun forTasks(tasks: Array<String>): BuildLauncher(source)

Sets the tasks to be executed. If no tasks are specified, the project's default tasks are executed.

Return

this

Since

1.0

Parameters

tasks

The paths of the tasks to be executed. Relative paths are evaluated relative to the project for which this launcher was created.


abstract fun forTasks(tasks: Array<Task>): BuildLauncher(source)
abstract fun forTasks(tasks: Iterable<out Task>): BuildLauncher(source)

Sets the tasks to be executed. If no tasks are specified, the project's default tasks are executed.

Note that the supplied tasks do not necessarily need to belong to the project which this launcher was created for.

Return

this

Since

1.0

Parameters

tasks

The tasks to be executed.