Closed msa1422 closed 9 months ago
I tried to reproduce the crashing using this sample project which we use for integration tests: https://github.com/realm/realm-kotlin/tree/main/integration-tests/gradle/gradle8-test
It also contains two modules, both using the Realm Gradle Plugin. The source code are currently using 8.3, but upgrading to 8.5 did not trigger the crash.
Are you by any chance loading two different versions of the Plugin?
Otherwise, if you are able to reproduce in a sample project we can try to figure out what is wrong from that, or perhaps you can compare our sample project with yours to see where they might differ.
I have created a sample project to reproduce this issue. However, it was reproduced just once. It happened when I added another (codingfeline.buildkonfig) plugin to Realm sync module. On next gradle sync, the issue disappeared. I will investigate more on this issue. I am using Version Catalog for dependency management, so I believe the plugin version should be same for both modules.
EDIT: After some more tweaking and hit and trial, I believe there is some issue with either Gradle caching or Plugin management in Kotlin DSL build.gradle.kts I applied the same set of plugins in both the modules, rebuilt the project and the issue has disappeared. I'll try to figure out the exact problem soon, but as of now, issue seems to be on Gradle or Kotlin side.
Yes, it sounds like it could be a Gradle cache issue somehow. Unfortunately, I'm not sure there is much we can do about it.
After discussing this, we are going to close this issue, as it most likely is a Gradle issue (which the error message also says). If this persists after cleaning the Gradle cache, please get back in touch.
@cmelchior I am affected by exactly the same issue when upgrading to v1.13.0 but unfortunately not able to solve it by rebuilding or cleaning the Gradle cache.
@Ynnck123 If you can reproduce this in a sample project. We will be happy to take a look.
How frequently does the bug occur?
Always
Description
Upgrading Realm to v1.13.0 causes compile time error in a Kotlin Multiplatform project. I have 2 modules (with Realm gradle plugin), one has a local Realm setup and the second one has device sync Realm setup. The error occurs only for the latter module. However, in another project where I am using only Sync config realm (only one module with realm plugin), I am facing no issues in upgrading the realm.
Stacktrace & log output
Can you reproduce the bug?
Always
Reproduction Steps
Upgrading Realm to v1.13.0
Version
Realm v1.13.0
What Atlas App Services are you using?
Both Atlas Device Sync and Atlas App Services
Are you using encryption?
Yes
Platform OS and version(s)
Android & iOS
Build environment
Android Studio version: Hedgehog 2023.1.1 Android Build Tools version: 34.0.0 Android Gradle Plugin version: reproducible on both 8.1.4 and 8.2.0 Gradle version: reproducible on both 8.4 and 8.5 Kotlin version: reproducible on both 1.9.10 and 1.9.20