Skip to content

Objectbox plugin doesn't support Gradle Configuration cache #1020

Closed

Description

@atulgpt

Describe the bug
The ObjectBox plugin doesn't support the Gradle Configuration cache. In AS arctic fox, AGP 7+ supports Gradle configuration cache. While running if configuration cache enabled mode it gives below error

- Plugin 'io.objectbox': read system property 'sun.arch.data.model'
  See https://docs.gradle.org/7.0.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- 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 https://docs.gradle.org/7.0.2/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
- Task `:app:transformClassesWithObjectBoxAndroidTransformForProdNotEncryptedRelease` of type `com.android.build.gradle.internal.pipeline.TransformTask`: 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 https://docs.gradle.org/7.0.2/userguide/configuration_cache.html#config_cache:requirements:disallowed_types

Basic info (please complete the following information):

  • ObjectBox version (are you using the latest version?): 3.0.1
  • Reproducibility: [e.g. occurred once only | occasionally without visible pattern | always]: always
  • Device: [e.g. Galaxy S20]: While building the project with configuration cache enabled
  • OS: [e.g. Android 10]: N/A

To Reproduce
Steps to reproduce the behaviour:

  1. Use Android studio Arctic fox
  2. Create a sample project using object box library
  3. Go to build analyzer(this appears when a build has succeeded)
  4. Optimize configuration steps
  5. It will show that ObjectBox plugin is not compatible
  6. Run Try Configuration cache in a build
  7. Now in build logs, it will print the logs(as attached by me previously)

Expected behaviour
Although Configuration cache is experimental, but we can start working on the same

Activity

  1. added
    enhancementNew feature or request
    and removed
    bugSomething isn't working
    on Nov 9, 2021
  2. greenrobot-team commented on Nov 9, 2021

    @greenrobot-team
    Member

    Thanks for reporting! Recategorized as feature request as the configuration cache is currently not tested/supported at all.

  3. atulgpt commented on Nov 12, 2021

    @atulgpt
    Author
  4. greenrobot commented on Apr 21, 2022

    @greenrobot
    Member

    Seems like a duplicate of #948 - can we close this one?

  5. greenrobot-team commented on Apr 25, 2022

    @greenrobot-team
    Member

    Moved details to #948 (comment)

    Closing this as a duplicate then.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions