Status Update
Comments
el...@google.com <el...@google.com>
yw...@gmail.com <yw...@gmail.com> #2
Waiting for Kotlin update in androidx:
da...@google.com <da...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Daniel Santiago Rivera <
Link:
Update RoomGradlePlugin KSP configuration to support KSP2
Expand for full commit details
Update RoomGradlePlugin KSP configuration to support KSP2
The plugin does per-variant / per-platform configuration by adding a CommandLineArgumentProvider to the KSP task, with KSP2 the task class is different and does not implement the KSP1 base class. This CL updates the plugin integration to find and also configure the KSP2 task.
KSP2 is also more strict with regards to AP options and disallows whitespaces in the key-value pairs. However it might be that a schema path might contain spaces, so the plugin and processor will now encode / decode spaces as URLs would to satisfy the format requirements.
Bug: 379159770
Test: Manually in sample project with KSP2 and Room
Change-Id: Iec3c435cbdfb994034500668f1ec602d5ebde3ce
Files:
- M
room/room-compiler/src/main/kotlin/androidx/room/processor/Context.kt
- M
room/room-gradle-plugin/src/main/java/androidx/room/gradle/RoomArgumentProvider.kt
- M
room/room-gradle-plugin/src/main/java/androidx/room/gradle/integration/AndroidPluginIntegration.kt
- M
room/room-gradle-plugin/src/main/java/androidx/room/gradle/integration/KotlinMultiplatformPluginIntegration.kt
- M
room/room-gradle-plugin/src/main/java/androidx/room/gradle/util/Utils.kt
Hash: baeb0389517c66be31be785be64157a2b32c1f15
Date: Wed Dec 04 21:31:47 2024
ap...@google.com <ap...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.room:room-compiler:2.7.0-alpha13
androidx.room:room-gradle-plugin:2.7.0-alpha13
da...@google.com <da...@google.com>
[Deleted User] <[Deleted User]> #5
tasks.matching { it.name.startsWith("copyRoomSchemasToAndroidTestAssetsDebugAndroidTest") }.configureEach {
enabled = false
}
But I believe this is not the right thing to do, since I'm hiding the error. Is there another way to solve it or will the library be updated to fix it?
da...@google.com <da...@google.com> #6
Unfortunately the fix did not make it to the alpha12 release, but it will indeed be in the next release.
ri...@ffw.com <ri...@ffw.com> #7
When will this be released? It's more than a month now?
da...@google.com <da...@google.com> #8
Sorry for the delay - Next androidx release is January 29
na...@google.com <na...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.room:room-gradle-plugin:2.7.0-alpha13
Description
Version used: 2.7.0-alpha08 to latest 2.7.0-alpha10
Devices/Android versions reproduced on: sdk 35
The Room compiler produces this build error:
Execution failed for task ':app:mergeDebugAndroidTestAssets'.
> The value for task ':app:copyRoomSchemasToAndroidTestAssetsDebugAndroidTest' property 'inputDirectory' is final and cannot be changed any further.
Reverting to Room version 2.7.0-alpha07 solves the issue.
I'm attaching a sample project that reproduces the error. Note that the error happens only by cleaning the build folder beforehand; the first full build with the "Make module" button runs "assembleDebug" and "assembleDebug...Test" tasks but from the second build it only runs "assembleDebug", so the build succeeds.