Status Update
Comments
m4...@gmail.com <m4...@gmail.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:
tz...@gmail.com <tz...@gmail.com> #3
Will try to use the example provided by you to check if it fixes the issue.
qn...@gmail.com <qn...@gmail.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")
}
ai...@gmail.com <ai...@gmail.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-master-dev
commit 2056c169a0689090adc59d0229f05e8a815e8881
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Jun 03 17:12:43 2020
Add RxJava 3 support to Room
Create a new artifact, room-rxjava3 that contains RxRoom that
uses io.reactivex.rxjava3 types. The processor is also updated
to identify the RxJava3 types in DAO return types to correctly
generate code that uses the new runtime.
Bug: 152427884
Test: ./gradlew :room:integration-tests:room-testapp:cC \
:room:room-compiler:test \
:room:room-rxjava3:test
Change-Id: I08e68d0ebd36d7434d2716532c0a7ee77fda3da9
M buildSrc/src/main/kotlin/androidx/build/PublishDocsRules.kt
M jetifier/jetifier/core/src/main/resources/default.config
M jetifier/jetifier/core/src/main/resources/default.generated.config
M jetifier/jetifier/migration.config
M room/compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/compiler/src/main/kotlin/androidx/room/processor/TransactionMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/RxTypes.kt
M room/compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxCallableQueryResultBinderProvider.kt
M room/compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxQueryResultBinderProvider.kt
M room/compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/RxPreparedQueryResultBinderProvider.kt
M room/compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateMethodBinderProvider.kt
M room/compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertMethodBinderProvider.kt
A room/compiler/src/test/data/common/input/Rx3Room.java
A room/compiler/src/test/data/common/input/rxjava3/Completable.java
A room/compiler/src/test/data/common/input/rxjava3/Flowable.java
A room/compiler/src/test/data/common/input/rxjava3/Maybe.java
A room/compiler/src/test/data/common/input/rxjava3/Observable.java
A room/compiler/src/test/data/common/input/rxjava3/Single.java
M room/compiler/src/test/kotlin/androidx/room/processor/InsertionMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/ShortcutMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/TransactionMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/compiler/src/test/kotlin/androidx/room/writer/DaoWriterTest.kt
M room/integration-tests/testapp/build.gradle
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/MailDao.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/UserDao.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/UserPetDao.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/MainThreadCheckTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/RxJava2Test.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/RxJava2WithInstantTaskExecutorTest.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/RxJava3Test.java
A room/rxjava3/api/2.3.0-alpha02.txt
A room/rxjava3/api/current.txt
A room/rxjava3/api/public_plus_experimental_2.3.0-alpha02.txt
A room/rxjava3/api/public_plus_experimental_current.txt
A room/rxjava3/api/res-2.3.0-alpha02.txt
A room/rxjava3/api/res-current.txt
A room/rxjava3/api/restricted_2.3.0-alpha02.txt
A room/rxjava3/api/restricted_current.txt
A room/rxjava3/build.gradle
A room/rxjava3/src/main/AndroidManifest.xml
A room/rxjava3/src/main/java/androidx/room/rxjava3/EmptyResultSetException.java
A room/rxjava3/src/main/java/androidx/room/rxjava3/RxRoom.java
A room/rxjava3/src/test/java/androidx/room/rxjava3/RxRoomTest.java
M settings.gradle
Description
From Room point of view I think the biggest difference is new package structure:
Not sure if it affects Room but RxJava 3 supports Java 8:
RxJava 3 can live next to RxJava 2 in a project and there is an interop library that helps with making them work together:
but I think that it would still be good to have direct RxJava 3 support in Room to make the adoption of RxJava 3 faster.