Assigned
Status Update
Comments
ap...@google.com <ap...@google.com> #2
cc...@google.com <cc...@google.com> #3
gr...@google.com <gr...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Daniel Santiago Rivera <
Link:
Make androidx.room and androidx.sqlite target Kotlin 2.0
Expand for full commit details
Make androidx.room and androidx.sqlite target Kotlin 2.0
This required the following changes:
* Suppress 'ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT' in SQLiteException.android.kt and ThreadLocal.jvmAndroid.kt due to being impossible to match annotations in expect when actual is a typealias to a platform type. Meanwhile in room-common repeatable annotations in JVM use @JvmRepeatable while expect uses Kotlin's @Repeatable and while trying to match actual with expect, an error is produced due to @JvmRepeatable and @Repeatable being used together.
* Fix various annotations mismatch between actual / expect.
* Removing @JvmField from common code as expect properties have no backing field and @JvmField targets FIELD.
* Smart-cast is not possible for expect properties, therefore first store in local variable before smart-case usage. Observed in TableInfo, FtsTableInfo, ViewInfo and MigrationUtil.
* Adding load() and getRefreshKey() to expect LimitOffsetPagingSource to conform to modality of actual overriding those functions.
* Make a XProcessingEnvConfig a normal class (instead of a data class) since it has a private constructor with a public copy() usage which is now invalid.
* Set useKsp2=true on projects with KSP and Kotlin language 2.0 (Room KMP test apps).
* Workaround KSP2 issue with default value of annotations not appearing in value list. Added a get() that returns nullable XAnnotationValue.
* Workaround KSP2 issue of projecting value class constructor as member of (to support generics).
* Workaround XPoet creating JavaPoet types of invalid methods (internal) when XProcessingEnvConfig.excludeMethodsWithInvalidJvmSourceNames is set to true due to Kotlin codegen.
Bug: 315461431
Bug: 384600605
Test: Existing
Relnote: "Native APIs updated due to Kotlin 2.0"
Change-Id: I8efb015c88682921780370c8bed5931d9933a319
Files:
- M
development/build_log_simplifier/messages.ignore
- M
room/integration-tests/kotlintestapp/build.gradle
- M
room/integration-tests/multiplatformtestapp/build.gradle
- M
room/room-common/bcv/native/current.txt
- M
room/room-common/build.gradle
- M
room/room-common/src/jvmMain/kotlin/androidx/room/DeleteColumn.jvm.kt
- M
room/room-common/src/jvmMain/kotlin/androidx/room/DeleteTable.jvm.kt
- M
room/room-common/src/jvmMain/kotlin/androidx/room/RenameColumn.jvm.kt
- M
room/room-common/src/jvmMain/kotlin/androidx/room/RenameTable.jvm.kt
- M
room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/InternalXAnnotation.kt
- M
room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/JavaPoetExt.kt
- M
room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XAnnotation.kt
- M
room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XProcessingEnvConfig.kt
- M
room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/util/NamingUtils.kt
- M
room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XAnnotationTest.kt
- M
room/room-compiler/build.gradle
- M
room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
- M
room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultimapQueryResultAdapter.kt
- M
room/room-compiler/src/test/kotlin/androidx/room/writer/BaseDaoKotlinCodeGenTest.kt
- M
room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
- M
room/room-compiler/src/test/kotlin/androidx/room/writer/DaoRelationshipKotlinCodeGenTest.kt
- M
room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
- M
room/room-compiler/src/test/test-data/kotlinCodeGen/database_daoProperty.kt
- M
room/room-compiler/src/test/test-data/kotlinCodeGen/database_internalVisibility.kt
- M
room/room-compiler/src/test/test-data/kotlinCodeGen/database_javaSource.kt
- M
room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
- M
room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
- M
room/room-compiler/src/test/test-data/kotlinCodeGen/guavaCallable_java.kt
- M
room/room-ktx/build.gradle
- M
room/room-migration/build.gradle
- M
room/room-paging-guava/build.gradle
- M
room/room-paging-rxjava2/build.gradle
- M
room/room-paging-rxjava3/build.gradle
- M
room/room-paging/build.gradle
- M
room/room-paging/src/androidMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.android.kt
- M
room/room-paging/src/commonMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.kt
- M
room/room-paging/src/jvmNativeMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.jvmNative.kt
- M
room/room-runtime/bcv/native/current.txt
- M
room/room-runtime/build.gradle
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/RoomConnectionManager.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/util/FtsTableInfo.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/util/MigrationUtil.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/util/TableInfo.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/util/ViewInfo.kt
- M
room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/concurrent/ThreadLocal.jvmAndroid.kt
- M
room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/InvalidationTracker.jvmNative.kt
- M
room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/TableInfo.jvmNative.kt
- M
room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/ViewInfo.jvmNative.kt
- M
room/room-runtime/src/nativeMain/kotlin/androidx/room/concurrent/ThreadLocal.native.kt
- M
room/room-rxjava2/build.gradle
- M
room/room-rxjava3/build.gradle
- M
room/room-testing/build.gradle
- M
sqlite/sqlite-bundled/build.gradle
- M
sqlite/sqlite-bundled/src/commonMain/kotlin/androidx/sqlite/driver/bundled/BundledSQLiteConnection.kt
- M
sqlite/sqlite-bundled/src/commonMain/kotlin/androidx/sqlite/driver/bundled/BundledSQLiteDriver.kt
- M
sqlite/sqlite-bundled/src/commonMain/kotlin/androidx/sqlite/driver/bundled/BundledSQLiteStatement.kt
- M
sqlite/sqlite-bundled/src/jvmAndroidMain/kotlin/androidx/sqlite/driver/bundled/BundledSQLite.jvmAndroid.kt
- M
sqlite/sqlite-framework/build.gradle
- M
sqlite/sqlite-ktx/build.gradle
- M
sqlite/sqlite/build.gradle
- M
sqlite/sqlite/src/androidMain/kotlin/androidx/sqlite/SQLiteException.android.kt
- M
sqlite/sqlite/src/androidUnitTest/kotlin/androidx/sqlite/db/SimpleSQLiteQueryTest.kt
Hash: 6e1e6e154483b9346ffc27a0e57d14bd20f4359f
Date: Mon Dec 16 22:13:20 2024
Description
Currently, there are several problems with the architecture of BenchmarkState/BenchmarkRule:
measureRepeatedOnMainThread()
is awkward, and happens within the measurement loopThis bug tracks an effort to rewrite much of the top level control flow of BenchmarkRule / BenchmarkState to be based on coroutines, and address all the above problems.