# BuildListener

interface BuildListener

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 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 org.gradle.tooling.events.OperationCompletionListener and register it via org.gradle.build.event.BuildEventsListenerRegistry. To react to the build work result, use getBuildWorkResult.

#### See also

Gradle

#### Inheritors

BuildAdapter

## Functions

beforeSettings
Link copied to clipboard
open fun beforeSettings(settings: Settings)
Called when the build settings are about to be loaded and evaluated.
buildFinished
Link copied to clipboard
abstract fun buildFinished(result: BuildResult)
Called when the build is completed.
projectsEvaluated
Link copied to clipboard
abstract fun projectsEvaluated(gradle: Gradle)
Called when all projects for the build have been evaluated.
projectsLoaded
Link copied to clipboard
abstract fun projectsLoaded(gradle: Gradle)
Called when the projects for the build have been created from the settings.
settingsEvaluated
Link copied to clipboard
abstract fun settingsEvaluated(settings: Settings)
Called when the build settings have been loaded and evaluated.