api / org.gradle.api / Task / doLast

doLast

abstract fun doLast(action: Action<in Task>): Task

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

Parameters

action - The action to add.

Return
the task object this method is applied to

@Incubating abstract fun doLast(actionName: String, action: Action<in Task>): Task

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

Parameters

actionName - An arbitrary string that is used for logging.

action - The action to add.

Return
the task object this method is applied to

Since
4.2

abstract fun doLast(action: Closure<Any>): Task

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

Parameters

action - The action closure to execute.

Return
This task.