Skip to content

Gradle Configuration Cache support for plugin #948

Open
objectbox/objectbox-java-generator
#10

Description

@akshay253101

Currently "io.objectbox" plugin doesn't support configuration cache. https://docs.gradle.org/current/userguide/configuration_cache.html

Plugin 'io.objectbox': read system property 'sun.arch.data.model'
See https://docs.gradle.org/6.8.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read

Activity

  1. greenrobot-team commented on Feb 16, 2021

    @greenrobot-team
    Member

    Thanks for sharing, I'll have a look (at some point)! Though I'd say this is an enhancement request, not a bug.

    More details from duplicate #1020:

    - 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
    

    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)

    https://medium.com/androiddevelopers/configuration-caching-deep-dive-bcb304698070

    Edit: this is internal issue objectbox/objectbox-java#310.

  2. added
    enhancementNew feature or request
    and removed
    bugSomething isn't working
    on Feb 16, 2021
  3. dekalo-stanislav commented on Apr 20, 2022

    @dekalo-stanislav

    HI, this item is pretty important for us as it is blocking our project to use Gradle configuration cache feature.

    Is your io.objectbox plugin available on Github to check its sources?

  4. dekalo-stanislav commented on Apr 21, 2022

    @dekalo-stanislav

    And there are already 2 requests for this feature #1020

  5. vdmitrovich commented on Oct 4, 2022

    @vdmitrovich

    Hello!

    @greenrobot Looks like you closed both of tickets as duplicate of each other ;-D

    For us it is pretty important change and if needed we can help to contribute or tailor some deal around that. If needed we can continue communication in other channel.

  6. greenrobot-team commented on Oct 10, 2022

    @greenrobot-team
    Member

    @vdmitrovich This issue is still open? Anyhow, I assume this means that the latest version of the ObjectBox Gradle plugin still is incompatible with the configuration cache (I haven't checked lately)?

  7. vdmitrovich commented on Oct 13, 2022

    @vdmitrovich

    We are using 3.2.0 - will check with 3.3.1 soon and update you

  8. AntonioShare commented on Oct 18, 2023

    @AntonioShare

    I would like to know when this support will be added, we will also be happy to contribute to the community

  9. deleted a comment from AntonioShare on Oct 23, 2023
  10. poldz123 commented on Jan 19, 2025

    @poldz123
  11. greenrobot-team commented on Jan 20, 2025

    @greenrobot-team
  12. Faltenreich commented on Sep 26, 2025

    @Faltenreich

    Any news regarding this topic?

    We receive the following errors when activating Gradles Configuration Cache with both ObjectBox 4.3.1 and 5.0.0:

    • [error] 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.
      - field project of io.objectbox.gradle.ProjectEnv
      - bean of type io.objectbox.gradle.ProjectEnv
      - field env of io.objectbox.gradle.PrepareTask
      - task :common:repository:objectboxPrepareBuild of type io.objectbox.gradle.PrepareTask
      - task :common:storage:objectboxPrepareBuild of type io.objectbox.gradle.PrepareTask
  13. 35 remaining items

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