doFirst

doFirst

The doFirst method adds an action to the beginning of a task's execution phase. This action is executed before all other actions defined in the task.

Usage Example:

tasks.register("exampleTask") {
    doFirst {
        println("This action runs before the main task actions.")
    }
}

Backlinks