Closed oheyadam closed 11 months ago
What exactly is reported to be the issue? I have tried to enable configuration caching in a sample project and it does work. Maybe related to specific versions of Gradle, AGP and realm.
Could you supply a reproducing project or try to fill in the information of the actual reported observation (stack trace, build/scan error, etc.) and the Gradle, AGP and Realm versions, etc. corresponding to the info requested in this form https://github.com/realm/realm-java/issues/new?assignees=&labels=T-Bug&projects=&template=bug.yml
Hey @rorbech, yea sorry my bad for not providing more information. Here's a screenshot from our build scan and you can see Gradle says this task doesn't have caching enabled. It's one of our longest running tasks as well.
We do have configuration cache enabled, and that works as you described, but configuration cache is different from the build cache. To make a task build-cacheable, you annotate it with the @Cacheable
annotation. More docs here. Sorry if you're already aware of all of this, not trying to over-explain things--just thought I'd send links.
We're running Android Studio Giraffe v2022.3.1, patch 4, Gradle v8.4, AGP v8.1.4 and realm-gradle-plugin v10.16.1.
Hi @oheyadam. It is not by design that our task should not be cacheable. Your screenshot points out that our task depends on the runtime_library_classes_jar
. We are depending on the library runtime classes, since a model definition can reference classes in other modules. If some of the dependencies changes we will have to rerun our transformer. Is that the explanation you were looking for?
Yep, absolutely. Thank you very much!
Problem
RealmTransformerTask
is on the critical path for us, but it's not cacheable according to our build scans. Is there a reason for that?Solution
Would it be possible to make this task cacheable, or is there a reason it's not?
Alternatives
No response
How important is this improvement for you?
Would be a major improvement
Feature would mainly be used with
Local Database only