Package org.gradle.api.execution
Schnittstelle TaskExecutionListener
- Alle bekannten Implementierungsklassen:
TaskExecutionAdapter
@ServiceScope(org.gradle.internal.service.scopes.Scope.Gradle.class)
@Deprecated
public interface TaskExecutionListener
Veraltet.
This type is not supported when configuration caching is enabled.
A TaskExecutionListener is notified of the execution of the tasks in a build.
You can add a TaskExecutionListener to a build using TaskExecutionGraph.addTaskExecutionListener(org.gradle.api.execution.TaskExecutionListener)
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidafterExecute(Task task, TaskState state) Veraltet.This method is called immediately after a task has been executed.voidbeforeExecute(Task task) Veraltet.This method is called immediately before a task is executed.
-
Methodendetails
-
beforeExecute
Veraltet.This method is called immediately before a task is executed.- Parameter:
task- The task about to be executed. Never null.
-
afterExecute
Veraltet.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.- Parameter:
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.
-