Interface BuildListener
- All Known Implementing Classes:
BuildAdapter
A BuildListener is notified of the major lifecycle events as a build is executed.
Registering this listener type is not supported when the
configuration cache is enabled.
The buildFinished(BuildResult) callback is incompatible
because it relies on execution-time state that is not available
on a cache hit.
To receive notifications about task completion, use a
BuildService that
implements OperationCompletionListener
and register it via
BuildEventsListenerRegistry.
To react to the build work result, use
FlowProviders.getBuildWorkResult().
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidbeforeSettings(Settings settings) Called when the build settings are about to be loaded and evaluated.voidbuildFinished(BuildResult result) Deprecated.This method is not supported when configuration caching is enabled.voidprojectsEvaluated(Gradle gradle) Called when all projects for the build have been evaluated.voidprojectsLoaded(Gradle gradle) Called when the projects for the build have been created from the settings.voidsettingsEvaluated(Settings settings) Called when the build settings have been loaded and evaluated.
-
Method Details
-
beforeSettings
Called when the build settings are about to be loaded and evaluated.- Parameters:
settings- The settings. Never null.- Since:
- 6.0
-
settingsEvaluated
Called when the build settings have been loaded and evaluated. The settings object is fully configured and is ready to use to load the build projects.
- Parameters:
settings- The settings. Never null.
-
projectsLoaded
Called when the projects for the build have been created from the settings. None of the projects have been evaluated.
- Parameters:
gradle- The build which has been loaded. Never null.
-
projectsEvaluated
Called when all projects for the build have been evaluated. The project objects are fully configured and are ready to use to populate the task graph.
- Parameters:
gradle- The build which has been evaluated. Never null.
-
buildFinished
Deprecated.This method is not supported when configuration caching is enabled.Called when the build is completed. All selected tasks have been executed.
- Parameters:
result- The result of the build. Never null.- See Also:
-