From 7702c6c9633b411f49a00807dd6ed1988a8bceb5 Mon Sep 17 00:00:00 2001 From: Jules Kerssemakers Date: Tue, 6 Feb 2024 13:59:45 +0100 Subject: [PATCH 1/3] Bump kotlin idea-plugin to match updated kotlin. --- .idea/kotlinc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index e805548a..8d81632f 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,6 +1,6 @@ - \ No newline at end of file From 7d060b4df73ad45e43a00f20dcf6f0fcc7be00c0 Mon Sep 17 00:00:00 2001 From: Jules Kerssemakers Date: Tue, 6 Feb 2024 14:11:55 +0100 Subject: [PATCH 2/3] Migrate Room annotation processing to faster Kotlin-Symbol-Processing per IDE suggestion, see also: https://developer.android.com/build/migrate-to-ksp --- app/build.gradle | 10 ++++------ build.gradle | 5 +++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 52fd85df..9adebf6b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,7 @@ plugins { id "com.android.application" id "kotlin-android" - id "kotlin-kapt" + id 'com.google.devtools.ksp' id "com.mikepenz.aboutlibraries.plugin" } @@ -24,10 +24,8 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - javaCompileOptions { - annotationProcessorOptions { - arguments += ["room.schemaLocation": "$projectDir/schemas".toString()] - } + ksp { + arg("room.schemaLocation", "$projectDir/schemas") } } @@ -77,7 +75,7 @@ dependencies { implementation "androidx.work:work-runtime-ktx:$workmanager_version" implementation "androidx.room:room-runtime:$room_version" implementation "androidx.room:room-ktx:$room_version" - kapt "androidx.room:room-compiler:$room_version" + ksp "androidx.room:room-compiler:$room_version" implementation "com.mikepenz:aboutlibraries:$about_libraries_version" implementation "androidx.core:core-splashscreen:1.0.1" diff --git a/build.gradle b/build.gradle index ae8cedca..060f2c2f 100644 --- a/build.gradle +++ b/build.gradle @@ -21,6 +21,11 @@ buildscript { } } +plugins { + // modern kotlin annotation support; replaces kapt: https://developer.android.com/build/migrate-to-ksp + id 'com.google.devtools.ksp' version '1.9.22-1.0.17' apply false +} + allprojects { repositories { google() From 47c50c2b0b619f5afa809b8a836e6424e89d8961 Mon Sep 17 00:00:00 2001 From: mueller-ma Date: Wed, 7 Feb 2024 17:45:45 +0100 Subject: [PATCH 3/3] Update app/build.gradle --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 9adebf6b..c723e38a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,7 @@ plugins { id "com.android.application" id "kotlin-android" - id 'com.google.devtools.ksp' + id "com.google.devtools.ksp" id "com.mikepenz.aboutlibraries.plugin" }