gradle
8.2

# task

inline fun Project.task(name: String, vararg args: Pair<String, Any?>): Task

Kotlin extension function for org.gradle.api.Project.task.

#### See also

Project.task

inline fun <type : Task> Project.task(name: String, noinline configuration: type.() -> Unit): type

Creates a Task with the given name and type, configures it with the given configuration action, and adds it to this project tasks container.

inline fun <type : Task> Project.task(name: String): type

Creates a Task with the given name and type, and adds it to this project tasks container.

#### See also

Project.getTasks
TaskContainer.create

fun <T : Task> Project.task(name: String, type: KClass<T>, configuration: T.() -> Unit): T