gradle
8.4

# 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

#### 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

#### Parameters

tasks

The tasks to be executed.