فهرست منبع

Replaced kapt with ksp

Vadik Sirekanyan 2 سال پیش
والد
کامیت
374cbdebfc
2فایلهای تغییر یافته به همراه7 افزوده شده و 8 حذف شده
  1. 6 7
      app/build.gradle
  2. 1 1
      build.gradle

+ 6 - 7
app/build.gradle

@@ -3,7 +3,7 @@ plugins {
     id 'org.jetbrains.kotlin.android'
     // TODO: 1202468796234411
     // id 'org.jetbrains.kotlin.plugin.serialization'
-    id 'org.jetbrains.kotlin.kapt'
+    id 'com.google.devtools.ksp'
     id 'org.sirekanyan.version-checker'
 }
 
@@ -20,11 +20,6 @@ android {
         vectorDrawables {
             useSupportLibrary true
         }
-        javaCompileOptions {
-            annotationProcessorOptions {
-                arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
-            }
-        }
         testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
     }
     buildTypes {
@@ -61,6 +56,10 @@ android {
     }
 }
 
+ksp {
+    arg('room.schemaLocation', "$projectDir/schemas")
+}
+
 dependencies {
 
     // androidx compose
@@ -70,7 +69,7 @@ dependencies {
     // androidx room
     implementation "androidx.room:room-runtime:$roomVersion"
     implementation "androidx.room:room-ktx:$roomVersion"
-    kapt "androidx.room:room-compiler:$roomVersion"
+    ksp "androidx.room:room-compiler:$roomVersion"
 
     /* TODO: 1202468796234411
     implementation "io.ktor:ktor-client-cio:$ktorVersion"

+ 1 - 1
build.gradle

@@ -13,7 +13,7 @@ plugins {
     id 'org.jetbrains.kotlin.android' version "$kotlinVersion" apply false
     // TODO: 1202468796234411
     // id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlinVersion" apply false
-    id 'org.jetbrains.kotlin.kapt' version "$kotlinVersion" apply false
+    id 'com.google.devtools.ksp' version "$kotlinVersion-1.0.11" apply false
     id 'org.sirekanyan.version-checker' version "1.0.7" apply false
 }