Skip to content

objectbox-gradle-plugin is not compatible with Gradle Configuration Cache #6

Closed as duplicate

Description

@BasetEsmaeili

Title: Bug: objectbox-gradle-plugin is not compatible with Gradle Configuration Cache

Description

The objectbox-gradle-plugin currently breaks the build when Gradle's configuration cache feature is enabled. The build fails during the configuration cache storing process because the :app:objectboxPrepareBuild task attempts to serialize a Project object, which is not supported.

This prevents developers from using a key Gradle feature that significantly speeds up build times.

To Reproduce

  1. Set up an Android project with the io.objectbox plugin.
  2. Enable the Gradle configuration cache in your gradle.properties file:
    org.gradle.configuration-cache=true
  3. Run a build command, for example: ./gradlew assembleDebug.
  4. Run the same command a second time to trigger the reuse of the configuration cache. The build will fail.

Expected Behavior

The build should complete successfully, and the configuration from the objectbox-gradle-plugin should be correctly stored in the configuration cache for reuse in subsequent builds.

Actual Behavior

The build fails on the second run with the following error message:

FAILURE: Build failed with an exception.

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

1 problem was found storing the configuration cache.
- Task `:app:objectboxPrepareBuild` of type `io.objectbox.gradle.PrepareTask`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.

See the build scan for details.

Environment

  • ObjectBox Gradle Plugin Version: 4.3.1
  • Gradle Version: 8.4
  • Android Gradle Plugin Version: 8.1.3
  • Operating System: macOS

Activity

  1. greenrobot-team commented on Sep 17, 2025

    @greenrobot-team
    Member

    Thanks for reporting. This is a duplicate of objectbox/objectbox-java#948.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions