Replace kapt by ksp

This commit is contained in:
Shinokuni 2024-07-06 14:01:58 +02:00
parent e6be6c36fe
commit 5bf974eb0c
3 changed files with 11 additions and 19 deletions

View File

@ -36,7 +36,7 @@ android {
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.0"
kotlinCompilerExtensionVersion = "1.5.3"
}
lint {

View File

@ -5,7 +5,7 @@ import com.android.build.gradle.LibraryPlugin
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
buildscript {
val kotlin_version = "1.8.0"
val kotlin_version = "1.9.10"
repositories {
google()
@ -19,6 +19,10 @@ buildscript {
}
}
plugins {
id("com.google.devtools.ksp") version "1.9.10-1.0.13" apply false
}
allprojects {
//apply("jacoco")

View File

@ -1,23 +1,14 @@
plugins {
id("com.android.library")
kotlin("android")
kotlin("kapt")
kotlin("plugin.parcelize")
id("com.google.devtools.ksp")
}
android {
namespace = "com.readrops.db"
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
arguments += mapOf(
"room.incremental" to "true",
"room.schemaLocation" to "$projectDir/schemas".toString()
)
}
}
consumerProguardFiles("consumer-rules.pro")
}
@ -32,12 +23,9 @@ android {
}
}
// Needed for kapt starting with kotlin plugin 1.5
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas")
arg("room.incremental", "true")
}
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
arg("room.incremental", "true")
}
dependencies {
@ -50,7 +38,7 @@ dependencies {
androidTestImplementation(libs.bundles.test)
implementation(libs.bundles.room)
kapt(libs.room.compiler)
ksp(libs.room.compiler)
androidTestImplementation(libs.room.testing)
implementation(libs.bundles.paging)