# doLast

open fun doLast(action: Action<in Task>): Task(source)

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

#### Return

the task object this method is applied to

#### Parameters

action

The action to add.

open fun doLast(actionName: String, action: Action<in Task>): Task(source)

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

#### Return

the task object this method is applied to

#### Since

4.2

#### Parameters

actionName

An arbitrary string that is used for logging.

action

The action to add.

open fun doLast(action: Closure): Task(source)

Adds the given closure to the end 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.