For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

addListener

abstract fun addListener(listener: Any)(source)

Adds the given listener to this build. The listener may implement any of the given listener interfaces:

The following listener types can be used, but are not supported when configuration caching is enabled. Their usage is deprecated and adding a listener of these types become an error in a future Gradle version:

Since

0.8

Parameters

listener

The listener to add. Does nothing if this listener has already been added.