Gradle task

A unit of work in a Gradle build, such as compileJava or test, which declares its inputs and outputs and its dependencies on other tasks.

In more detail

Running a task runs the tasks it depends on first, following the graph. Because each task declares what it reads and writes, Gradle can skip it when nothing changed or reuse its output from a cache. Build scripts configure existing tasks, such as telling the test task to use the JUnit Platform.

Example

tasks.test { useJUnitPlatform() }

Related terms

Taught in

References