api / org.gradle.tooling / ModelBuilder / forTasks

forTasks

abstract fun forTasks(vararg tasks: String): ModelBuilder<T>

Specifies the tasks to execute before building the model. If not configured, null, or an empty array is passed, then no tasks will be executed.

Parameters

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

Return
this

Since
1.2

abstract fun forTasks(tasks: MutableIterable<String>): ModelBuilder<T>

Specifies the tasks to execute before building the model. If not configured, null, or an empty array is passed, then no tasks will be executed.

Parameters

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

Return
this

Since
2.6