Task Execution Graph
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 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 evaluated. It is empty before then. You can receive a notification when the graph is populated, using whenReady or addTaskExecutionGraphListener.
Functions
Link copied to clipboard
Adds a listener to this graph, to be notified when this graph is ready.
Link copied to clipboard
Adds a listener to this graph, to be notified as tasks are executed.
Link copied to clipboard
Adds a closure to be called immediately before a task is executed.
Adds an action to be called immediately before a task is executed.
Link copied to clipboard
Returns the tasks which are included in the execution plan.
Link copied to clipboard
Returns the dependencies of a task which are part of the execution graph.
Link copied to clipboard
Remove a listener from this graph.
Link copied to clipboard
Remove a listener from this graph.
Link copied to clipboard
Adds a closure to be called when this graph has been populated.
Adds an action to be called when this graph has been populated.