For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

afterExecute

open fun afterExecute(task: Task, state: TaskState)(source)

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

Since

0.9

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.