api / org.gradle.api.execution

Package org.gradle.api.execution



interface TaskActionListener

A TaskActionListener is notified of the actions that a task performs.


open class TaskExecutionAdapter : TaskExecutionListener

A TaskExecutionListener adapter class for receiving task execution events. The methods in this class are empty. This class exists as convenience for creating listener objects.


interface TaskExecutionGraph

A TaskExecutionGraph is responsible for managing the execution of the Task instances which are part of the build. The TaskExecutionGraph maintains an execution plan of tasks to be executed (or which have been executed), and you can query this plan from your build file.

You can access the TaskExecutionGraph by calling org.gradle.api.invocation.Gradle#getTaskGraph(). In your build file you can use gradle.taskGraph to access it.

The TaskExecutionGraph is populated only after all the projects in the build have been evaulated. It is empty before then. You can receive a notification when the graph is populated, using or #addTaskExecutionGraphListener(TaskExecutionGraphListener).


interface TaskExecutionGraphListener

A TaskExecutionGraphListener is notified when the TaskExecutionGraph has been populated. You can use this interface in your build file to perform some action based on the contents of the graph, before any tasks are actually executed.


interface TaskExecutionListener

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

You can add a TaskExecutionListener to a build using org.gradle.api.execution.TaskExecutionGraph#addTaskExecutionListener