# TaskExecutionListener

@ServiceScope(value = Gradle::class)
interface TaskExecutionListener(source)

### Deprecated

A `TaskExecutionListener` is notified of the execution of the tasks in a build.

You can add a `TaskExecutionListener` to a build using addTaskExecutionListener

#### Deprecated

This type is not supported when configuration caching is enabled.

#### Inheritors

TaskExecutionAdapter

## Functions

afterExecute
Link copied to clipboard
abstract fun afterExecute(task: Task, state: TaskState)
This method is called immediately after a task has been executed.
beforeExecute
Link copied to clipboard
abstract fun beforeExecute(task: Task)
This method is called immediately before a task is executed.