From bc303d3d126eb79ca26c37b92697dec02b3d5c9e Mon Sep 17 00:00:00 2001 From: Vitor Hugo Schwaab Date: Mon, 4 Sep 2023 18:44:38 +0200 Subject: [PATCH] chore: upgrade hilt to use ksp (#2174) --- app/build.gradle.kts | 4 ---- .../plugins/src/main/kotlin/HiltConventionPlugin.kt | 7 +++---- gradle/libs.versions.toml | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4a3862dd50d..af9c3237091 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -59,10 +59,6 @@ android { } } -kapt { - correctErrorTypes = true -} - dependencies { implementation("com.wire.kalium:kalium-logic") implementation("com.wire.kalium:kalium-util") diff --git a/build-logic/plugins/src/main/kotlin/HiltConventionPlugin.kt b/build-logic/plugins/src/main/kotlin/HiltConventionPlugin.kt index 8384945f44a..024b632f6ce 100644 --- a/build-logic/plugins/src/main/kotlin/HiltConventionPlugin.kt +++ b/build-logic/plugins/src/main/kotlin/HiltConventionPlugin.kt @@ -23,16 +23,15 @@ class HiltConventionPlugin : Plugin { override fun apply(target: Project): Unit = with(target) { with(pluginManager) { apply("dagger.hilt.android.plugin") - // TODO: Replace with KSP as soon as Hilt supports it - apply("org.jetbrains.kotlin.kapt") + apply("com.google.devtools.ksp") } dependencies { add("implementation", findLibrary("hilt.android")) add("androidTestImplementation", findLibrary("hilt.android")) - add("kapt", findLibrary("hilt.compiler")) - add("kaptAndroidTest", findLibrary("hilt.compiler")) + add("ksp", findLibrary("hilt.compiler")) + add("kspAndroidTest", findLibrary("hilt.compiler")) add("androidTestImplementation", findLibrary("hilt.test")) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ca569eb9ab3..29f061593ce 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -45,7 +45,7 @@ compose-navigation = "2.6.0" compose-destinations = "1.9.40-beta" # Hilt -hilt = "2.47" +hilt = "2.48" hilt-composeNavigation = "1.0.0" hilt-work = "1.0.0"