From b1909025c05fb11e8a88e30a11eee0716411ae41 Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Thu, 30 May 2024 12:20:20 +0530 Subject: [PATCH] gradle: Migrate from kapt to ksp Signed-off-by: Aayush Gupta --- build.gradle.kts | 2 +- gradle/libs.versions.toml | 3 ++- storage/demo/build.gradle.kts | 2 +- storage/lib/build.gradle.kts | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 4a1d9b06..ae47a822 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,9 +8,9 @@ import org.jlleitschuh.gradle.ktlint.KtlintExtension plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.android.library) apply false + alias(libs.plugins.google.ksp) apply false alias(libs.plugins.google.protobuf) apply false alias(libs.plugins.jetbrains.kotlin.android) apply false - alias(libs.plugins.jetbrains.kotlin.kapt) apply false alias(libs.plugins.jetbrains.dokka) apply false alias(libs.plugins.jlleitschuh.ktlint) apply false } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a305859c..b170fc07 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -32,6 +32,7 @@ espresso = "3.4.0" # 1.9.0 Android 14 (QPR2) # Check: https://android.googlesource.com/platform/external/kotlinc/+/refs/tags/android-14.0.0_r29/build.txt kotlin = { strictly = "1.9.0" } +ksp = "1.9.0-1.0.13" # Keep in match with kotlin version # Lint versions lint-rules = { strictly = "0.1.0" } @@ -108,8 +109,8 @@ coroutines = ["kotlinx-coroutines-core-jvm", "kotlinx-coroutines-android"] [plugins] android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" } +google-ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } google-protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" } jetbrains-dokka = { id = "org.jetbrains.dokka", version.ref = "kotlin" } jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } -jetbrains-kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" } jlleitschuh-ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" } diff --git a/storage/demo/build.gradle.kts b/storage/demo/build.gradle.kts index effa673e..baa45faf 100644 --- a/storage/demo/build.gradle.kts +++ b/storage/demo/build.gradle.kts @@ -5,9 +5,9 @@ plugins { alias(libs.plugins.android.application) + alias(libs.plugins.google.ksp) alias(libs.plugins.google.protobuf) alias(libs.plugins.jetbrains.kotlin.android) - alias(libs.plugins.jetbrains.kotlin.kapt) } android { diff --git a/storage/lib/build.gradle.kts b/storage/lib/build.gradle.kts index dec7c24e..9d1ba5d3 100644 --- a/storage/lib/build.gradle.kts +++ b/storage/lib/build.gradle.kts @@ -6,9 +6,9 @@ import com.google.protobuf.gradle.id */ plugins { alias(libs.plugins.android.library) + alias(libs.plugins.google.ksp) alias(libs.plugins.google.protobuf) alias(libs.plugins.jetbrains.kotlin.android) - alias(libs.plugins.jetbrains.kotlin.kapt) alias(libs.plugins.jetbrains.dokka) } @@ -94,7 +94,7 @@ dependencies { implementation(libs.google.protobuf.javalite) implementation(libs.google.tink.android) - kapt(group = "androidx.room", name = "room-compiler", version = libs.versions.room.get()) + ksp(group = "androidx.room", name = "room-compiler", version = libs.versions.room.get()) lintChecks(libs.thirdegg.lint.rules) testImplementation("junit:junit:${libs.versions.junit4.get()}") testImplementation("io.mockk:mockk:${libs.versions.mockk.get()}")