Status Update
Comments
ma...@marcardar.com <ma...@marcardar.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:
da...@google.com <da...@google.com> #3
Will try to use the example provided by you to check if it fixes the issue.
ma...@marcardar.com <ma...@marcardar.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")
}
da...@google.com <da...@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"
ed...@gmail.com <ed...@gmail.com> #6
ap...@google.com <ap...@google.com> #7
Branch: androidx-master-dev
commit 633c84b26612914f9799d3dddfea5467afa36232
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Feb 11 17:13:04 2019
Support non-abstract @Transaction suspend DAO functions.
We can't support Rx, ListenableFutures or LiveData return types in
non-abstract @Transaction methods but we can support suspend methods by
utilizing the withTransactionContext API.
Bug: 120241587
Test: ./gradlew room:room-compiler:test \
room:integration-tests:room-testapp-kotlin:cC \
room:integration-tests:room-testapp:cC
Change-Id: I60c7115d375f688d1be17ea57e53e131b90957e5
M room/compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
M room/compiler/src/main/kotlin/androidx/room/processor/TransactionMethodProcessor.kt
A room/compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
A room/compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionMethodBinder.kt
A room/compiler/src/main/kotlin/androidx/room/solver/transaction/binder/TransactionMethodBinder.kt
A room/compiler/src/main/kotlin/androidx/room/solver/transaction/result/TransactionMethodAdapter.kt
M room/compiler/src/main/kotlin/androidx/room/vo/TransactionMethod.kt
M room/compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/compiler/src/test/data/daoWriter/output/ComplexDao.java
M room/compiler/src/test/kotlin/androidx/room/processor/TransactionMethodProcessorTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/AbstractDao.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/BooksDaoTest.kt
Description
@Transaction
suspend fun insertBookAndAuthorSuspend(book: Book, author: Author) {
addBooks(book)
addAuthors(author)
}