objectbox / objectbox-java

Android Database - first and fast, lightweight on-device vector database
https://objectbox.io
Apache License 2.0
4.39k stars 302 forks source link

Gradle Configuration Cache support for plugin #948

Open akshay253101 opened 3 years ago

akshay253101 commented 3 years ago

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

greenrobot-team commented 3 years ago

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

dekalo-stanislav commented 2 years ago

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?

dekalo-stanislav commented 2 years ago

And there are already 2 requests for this feature #1020

vdmitrovich commented 2 years ago

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.

greenrobot-team commented 2 years ago

@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)?

vdmitrovich commented 1 year ago

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

AntonioShare commented 11 months ago

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