gradle
8.2

# doFirst

abstract fun doFirst(action: Action<out Any>): Task

Adds the given Action to the beginning of this task's action list.

#### Return

the task object this method is applied to

#### Parameters

action

The action to add

abstract fun doFirst(@DelegatesTo(value = Task::class) action: Closure): Task

Adds the given closure to the beginning of this task's action list. The closure is passed this task as a parameter when executed.

#### Return

This task.

#### Parameters

action

The action closure to execute.

abstract fun doFirst(actionName: String, action: Action<out Any>): Task

Adds the given Action to the beginning of this task's action list.

#### Return

the task object this method is applied to

#### Parameters

actionName

An arbitrary string that is used for logging.

action

The action to add