Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Remove buildFinished listener in order to support gradle configuration-cache #333

@simschla

Description

@simschla

As of 4.1.0, the plugin adds a Gradle.buildFinished listener, which makes it incompatible with gradle's configuration cache.

In my build I get the following output when grgit is applied while configuration-cache=true is enabled:

FAILURE: Build failed with an exception.

* Where:
Build file '[...]/build.gradle' line: 8

* What went wrong:
Configuration cache problems found in this build.

4 problems were found storing the configuration cache, 3 of which seem unique.
[ redacted the problems of our own build files]
- Plugin 'org.ajoberstar.grgit': registration of listener on 'Gradle.buildFinished' is unsupported
  See https://docs.gradle.org/6.8.1/userguide/configuration_cache.html#config_cache:requirements:build_listeners

See the complete report at file:[...]/configuration-cache-report.html

Would be nice if this could be changed - which seems to be straightforward using a BuildService

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions