# task

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

### Deprecated

Deprecated Gradle API

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

#### Since

0.8

#### See also

org.gradle.api.Project.task

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

### Deprecated

Use tasks.register instead

#### Replace with

    tasks.register<type>(name, configuration)

Content copied to clipboard

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

#### Since

4.1

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

### Deprecated

Use tasks.register instead

#### Replace with

    tasks.register<type>(name)

Content copied to clipboard

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

#### Since

5.6

#### See also

Project.getTasks
TaskContainer.create

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

### Deprecated

Use tasks.register instead

#### Replace with

    tasks.register(name, type, configuration)

Content copied to clipboard

#### Since

4.1