diff --git a/biz/main/build.gradle.kts b/biz/main/build.gradle.kts index 52791068d..15ac66db0 100644 --- a/biz/main/build.gradle.kts +++ b/biz/main/build.gradle.kts @@ -2,6 +2,7 @@ plugins { alias(libs.plugins.android.library) alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.kapt) + alias(libs.plugins.ksp) alias(libs.plugins.moshiX) } @@ -14,13 +15,6 @@ android { ) } -kapt { - correctErrorTypes = true - arguments { - arg("room.incremental", "true") - } -} - dependencies { implementation(projects.common) @@ -28,7 +22,7 @@ dependencies { implementation(libs.flycoTabLayout) implementation(libs.bundles.androidX.room) - kapt(libs.androidX.room.compiler) + ksp(libs.androidX.room.compiler) implementation(libs.square.moshi) } diff --git a/build.gradle.kts b/build.gradle.kts index 964468964..3e7c1ed47 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,7 @@ import com.android.build.gradle.BaseExtension +import com.google.devtools.ksp.gradle.KspExtension import io.gitlab.arturbosch.detekt.extensions.DetektExtension +import org.jetbrains.kotlin.gradle.plugin.KaptExtension import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jmailen.gradle.kotlinter.KotlinterExtension @@ -8,6 +10,7 @@ plugins { alias(libs.plugins.android.library) apply false alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.kapt) apply false + alias(libs.plugins.ksp) apply false alias(libs.plugins.kotlinter) apply false alias(libs.plugins.detekt) apply false alias(libs.plugins.moshiX) apply false @@ -61,6 +64,16 @@ subprojects { plugins.withId(rootProject.libs.plugins.android.application.get().pluginId) { setupCommon() } + plugins.withId(rootProject.libs.plugins.kotlin.kapt.get().pluginId) { + configure { + correctErrorTypes = true + } + } + plugins.withId(rootProject.libs.plugins.ksp.get().pluginId) { + configure { + arg("room.incremental", "true") + } + } } tasks { @@ -68,8 +81,8 @@ tasks { val customFileTypes = fileTree( mapOf( "dir" to "$rootDir/gradle", - "include" to arrayOf("*.log", "*.txt") - ) + "include" to arrayOf("*.log", "*.txt"), + ), ) delete(rootProject.buildDir, customFileTypes) } diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 51db4d6df..48d7bce9b 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -2,6 +2,7 @@ plugins { alias(libs.plugins.android.library) alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.kapt) + alias(libs.plugins.ksp) alias(libs.plugins.moshiX) } @@ -18,13 +19,6 @@ android { } } -kapt { - correctErrorTypes = true - arguments { - arg("room.incremental", "true") - } -} - dependencies { api(projects.base) api(projects.adapter) @@ -39,7 +33,7 @@ dependencies { api(libs.utils) implementation(libs.bundles.androidX.room) - kapt(libs.androidX.room.compiler) + ksp(libs.androidX.room.compiler) implementation(libs.bundles.coil) implementation(libs.square.moshi) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a270d0ec0..27c8c37af 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -28,6 +28,7 @@ android-application = { id = "com.android.application", version.ref = "agp" } android-library = { id = "com.android.library", version.ref = "agp" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" } +ksp = "com.google.devtools.ksp:1.7.10-1.0.6" moshiX = "dev.zacsweers.moshix:0.18.3" kotlinter = "org.jmailen.kotlinter:3.11.1" detekt = "io.gitlab.arturbosch.detekt:1.21.0"