Skip to content

Commit 71e1cf7

Browse files
committed
Migrate to kotlin 2
also migrated ksp and room to versions supporting k2
1 parent e9b6ba9 commit 71e1cf7

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,6 @@ site/
9494
# (which is slightly confusing, but helps mkdocs to validate links)
9595
# so we ignore that here, as it's a built artifact that should not be committed
9696
docs/use/api/*/**
97+
98+
# Kotlin 2.0
99+
.kotlin/

buildSrc/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repositories {
1111
dependencies {
1212
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.22.0")
1313

14-
implementation("com.android.tools.build:gradle:8.5.0")
14+
implementation("com.android.tools.build:gradle:8.9.2")
1515

1616
implementation("app.cash.licensee:licensee-gradle-plugin:1.8.0")
1717
implementation("com.osacky.flank.gradle:fladle:0.17.4")

buildSrc/src/main/kotlin/Plugins.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,18 @@ object Plugins {
3636
const val androidGradlePlugin = "com.android.tools.build:gradle:${Versions.androidGradlePlugin}"
3737
const val benchmarkGradlePlugin =
3838
"androidx.benchmark:benchmark-gradle-plugin:${Versions.benchmarkPlugin}"
39-
const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22"
39+
const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
4040
const val navSafeArgsGradlePlugin = "androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0"
4141
const val rulerGradlePlugin = "com.spotify.ruler:ruler-gradle-plugin:1.2.1"
4242
const val flankGradlePlugin = "com.osacky.flank.gradle:fladle:0.17.4"
4343
const val kspGradlePlugin =
4444
"com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:${Versions.kspPlugin}"
4545

4646
object Versions {
47-
const val androidGradlePlugin = "8.5.0"
47+
const val androidGradlePlugin = "8.9.2"
4848
const val benchmarkPlugin = "1.3.4"
4949
const val dokka = "1.9.20"
50-
const val kspPlugin = "1.9.22-1.0.18"
50+
const val kspPlugin = "2.1.20-2.0.1"
51+
const val kotlin = "2.1.20"
5152
}
5253
}

engine/src/main/java/com/google/android/fhir/db/impl/SQLCipherSupportHelper.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ internal class SQLCipherSupportHelper(
7474
}
7575
}
7676

77-
override val databaseName = standardHelper.databaseName
77+
override val databaseName
78+
get() = standardHelper.databaseName
7879

7980
override fun setWriteAheadLoggingEnabled(enabled: Boolean) {
8081
standardHelper.setWriteAheadLoggingEnabled(enabled)
@@ -119,7 +120,8 @@ internal class SQLCipherSupportHelper(
119120
throw lastException ?: DatabaseEncryptionException(Exception(), UNKNOWN)
120121
}
121122

122-
override val readableDatabase = writableDatabase
123+
override val readableDatabase
124+
get() = writableDatabase
123125

124126
override fun close() {
125127
standardHelper.close()

gradle/libs.versions.toml

+5-6
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ androidx-lifecycle = "2.6.1"
1818
androidx-navigation = "2.6.0"
1919
androidx-profilerinstaller = "1.4.1"
2020
androidx-recyclerview = "1.3.2"
21-
androidx-room = "2.5.2"
22-
androidx-sqlite = "2.3.1"
21+
androidx-room = "2.7.1"
22+
androidx-sqlite = "2.5.0"
2323
androidx-test-core = "1.6.1"
2424
androidx-test-ext-junit = "1.1.5"
2525
androidx-test-rules = "1.5.0"
@@ -28,8 +28,7 @@ androidx-tracing = "1.3.0"
2828
androidx-work = "2.8.1"
2929
glide = "4.16.0"
3030
junit = "4.13.2"
31-
kotlin-stdlib = "1.9.22"
32-
kotlin-test = "1.9.22"
31+
kotlin = "2.1.20"
3332
kotlinx-coroutines = "1.8.1"
3433
logback-android = "3.0.0"
3534
material = "1.9.0"
@@ -78,8 +77,8 @@ androidx-work-runtime = { module = "androidx.work:work-runtime-ktx", version.ref
7877
androidx-work-testing = { module = "androidx.work:work-testing", version.ref = "androidx-work" }
7978
glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }
8079
junit = { module = "junit:junit", version.ref = "junit" }
81-
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin-stdlib" }
82-
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin-test" }
80+
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
81+
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
8382
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
8483
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
8584
kotlinx-coroutines-playservices = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services", version.ref = "kotlinx-coroutines" }
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)