objectbox-java icon indicating copy to clipboard operation
objectbox-java copied to clipboard

Gradle Configuration Cache support for plugin

Open akshay253101 opened this issue 4 years ago • 9 comments

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

akshay253101 avatar Feb 10 '21 07:02 akshay253101

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

greenrobot-team avatar Feb 16 '21 07:02 greenrobot-team

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 avatar Apr 20 '22 22:04 dekalo-stanislav

And there are already 2 requests for this feature #1020

dekalo-stanislav avatar Apr 21 '22 07:04 dekalo-stanislav

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.

vdmitrovich avatar Oct 04 '22 14:10 vdmitrovich

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

greenrobot-team avatar Oct 10 '22 05:10 greenrobot-team

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

vdmitrovich avatar Oct 13 '22 11:10 vdmitrovich

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

AntonioShare avatar Oct 18 '23 01:10 AntonioShare