Status Update
Comments
ap...@google.com <ap...@google.com> #2
For Kotlin 2.0 and KSP 2.0 the Cannot change attributes of configuration ':composeApp:debugFrameworkIosX64' after it has been locked for mutation
really seems like a KSP issue. You should file a bug in their repository with a sample app if possible.
If you downgrade to Kotlin 1.9 then things 'should' work, there are example apps out there with such configuration, like the following one:
ap...@google.com <ap...@google.com> #3
Will try to use the example provided by you to check if it fixes the issue.
ap...@google.com <ap...@google.com> #4
Note that this issue happens when applying the Compose, KSP and Room Plugin together in Kotlin 2.0.x, the workaround for now is to not use the Room Gradle Plugin and instead specify the schema location vis KSP arguments:
// In the build.gradle
ksp {
arg("room.schemaLocation", "${projectDir}/schemas")
}
ap...@google.com <ap...@google.com> #5
Hi, I encountered a similar problem and was able to resolve it by updating the dependencies
room = "2.7.0-alpha08"
ksp = "2.0.20-1.0.25"
compose-plugin = "1.6.11"
kotlin = "2.0.20"
ap...@google.com <ap...@google.com> #6
Branch: androidx-main
commit 7ce58f6d42595983aab61f37ac70032e9171e238
Author: Yigit Boyar <yboyar@google.com>
Date: Mon Nov 15 21:15:55 2021
Support internal properties in Room
This CL fixes a bug in POJO processor where while matching fields to
methods, it was using the jvm name of the method rather than the source
name.
As the JVM name for internal properties get a $pkg suffix, they were not
matching the property
Fixes: 205289020
Test: InternalsTest
RelNote: "Added support for internal properties in Kotlin sources.
This is a slight behavior change in Room where it will use the source
name of functions while matching them to properties as getters/setters
(previously, it was using JVM name of the function which is different
for internal functions/properties).
If you are using custom `@JvmName` annotations to match getters/setters
to private properties, please double check the generated code after the
update"
Change-Id: If653164362c49fd00650d9a953f330afdb309c1c
M room/room-compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/InternalsTest.kt
Description
see this test:https://android-review.googlesource.com/c/platform/frameworks/support/+/1881029/3/room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/InternalsTest.kt#48
This does not even compile as it seems like we don't properly rename getters/setters for properties such that we cannot find the getter/setter for internal properties.