api / org.gradle.api.execution / TaskExecutionListener / afterExecute

afterExecute

abstract fun afterExecute(task: Task, state: TaskState): Unit

This method is call immediately after a task has been executed. It is always called, regardless of whether the task completed successfully, or failed with an exception.

Parameters

task - The task which was executed. Never null.

state - The task state. If the task failed with an exception, the exception is available in this state. Never null.