fix(build): pin kotlinx-serialization to 1.8.1 for Room migration tests
AGP 9's consistent resolution shares the runtime serialization version with the androidTest classpath, where androidx.savedstate pins it to 1.7.3. Room 2.8's schema-bundle serializers are compiled against >= 1.8.0, so MigrationTestHelper threw AbstractMethodError on GeneratedSerializer.typeParametersSerializers(), failing every E2E job. Import the serialization BOM as a platform to force 1.8.1. Verified on-device (API 37): Migration9To10Test fails unpatched, passes patched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -189,6 +189,11 @@ dependencies {
|
||||
ksp(libs.androidx.room.compiler)
|
||||
implementation(libs.sqlcipher.android)
|
||||
|
||||
// Raise kotlinx-serialization to the version Room's schema-bundle serializers were compiled
|
||||
// against (see libs.versions.toml). AGP 9 consistent resolution shares it with the androidTest
|
||||
// classpath so MigrationTestHelper can parse the exported schema JSON.
|
||||
implementation(platform(libs.kotlinx.serialization.bom))
|
||||
|
||||
testImplementation(libs.junit)
|
||||
testImplementation(libs.kotlin.test)
|
||||
testImplementation(libs.kotlinx.coroutines.test)
|
||||
|
||||
@@ -15,6 +15,10 @@ sqlcipher = "4.16.0"
|
||||
datastore = "1.2.1"
|
||||
work = "2.11.2"
|
||||
coroutines = "1.10.2"
|
||||
# Forced above androidx.savedstate's transitive 1.7.3 (shared with the androidTest classpath via
|
||||
# AGP 9 consistent resolution); Room's schema-bundle serializers need >= 1.8.0 or MigrationTestHelper
|
||||
# throws AbstractMethodError on GeneratedSerializer.typeParametersSerializers().
|
||||
kotlinxSerialization = "1.8.1"
|
||||
appauth = "0.11.1"
|
||||
angusMail = "2.0.5"
|
||||
junit = "4.13.2"
|
||||
@@ -76,6 +80,10 @@ androidx-work-runtime-ktx = { group = "androidx.work", name = "work-runtime-ktx"
|
||||
kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "coroutines" }
|
||||
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutines" }
|
||||
|
||||
# Serialization BOM — imported as a platform (not used directly) to raise the transitive
|
||||
# kotlinx-serialization runtime to the version Room's schema bundles were compiled against.
|
||||
kotlinx-serialization-bom = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-bom", version.ref = "kotlinxSerialization" }
|
||||
|
||||
# Email transport / OAuth — wired in later increments
|
||||
appauth = { group = "net.openid", name = "appauth", version.ref = "appauth" }
|
||||
angus-mail = { group = "org.eclipse.angus", name = "angus-mail", version.ref = "angusMail" }
|
||||
|
||||
Reference in New Issue
Block a user