Fixed
Status Update
Comments
da...@google.com <da...@google.com> #2
+1, this is a severe bug if I've ever seen one. If it is on par with the #74139250 (https://issuetracker.google.com/issues/74139250 ), this should be at least P1
ap...@google.com <ap...@google.com> #3
1) Thank you for reporting this issue.We were not able to reproduce the issue with the information provided here.
Logs after follow mentioned steps in comment #1
===============================================
V/TAG: ViewModelFirst Created
2) Can you please provide the below requested information to better understand the issue:
Android build
Which Android build are you using? (e.g. KVT49L)
Device used
Which device did you use to reproduce this issue?
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Logs after follow mentioned steps in
===============================================
V/TAG: ViewModelFirst Created
2) Can you please provide the below requested information to better understand the issue:
Android build
Which Android build are you using? (e.g. KVT49L)
Device used
Which device did you use to reproduce this issue?
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Description
Component used: KMP + Multiplatform Compose + Android Application Gradle Plugin + Room + KSP Version used: 2.7.0-alpha06
Initially issue was reported to Kotlin Team:https://youtrack.jetbrains.com/issue/KT-70966/Cannot-change-attributes-of-configuration-composeAppdebugFrameworkIosX64-after-it-has-been-locked-for-mutation
Where I've made the investigation and found multiple problems, including room gradle plugin. I found that Room Gradle Plugin has this code :
Calling DomainObjectCollection.html#withType which is equal to
tasks.withType(X::class.java) {}
resolved intotasks.withType(X::class.java).all {}
. It is eager subscription API that will cause all tasks of type X to be resolved as soon as they're registered.The correct API would be:
tasks.withType(X::class.java).configureEach {}
See my report in the comments of KT issue for more details. Reproducer also attached.