You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Objectbox plugin doesn't support Gradle Configuration cache #1020
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:
Use Android studio Arctic fox
Create a sample project using object box library
Go to build analyzer(this appears when a build has succeeded)
Optimize configuration steps
It will show that ObjectBox plugin is not compatible
Run Try Configuration cache in a build
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
Reacted by Uwe (ObjectBox), Stanislav Dekalo and Sergey Kiselyov
Activity
greenrobot-team commentedon Nov 9, 2021
Thanks for reporting! Recategorized as feature request as the configuration cache is currently not tested/supported at all.
atulgpt commentedon Nov 12, 2021
Thanks. Here is the great article for migration https://medium.com/androiddevelopers/configuration-caching-deep-dive-bcb304698070
greenrobot commentedon Apr 21, 2022
Seems like a duplicate of #948 - can we close this one?
greenrobot-team commentedon Apr 25, 2022
Moved details to #948 (comment)
Closing this as a duplicate then.