Skip to content

Commit bb76cd5

Browse files
committed
use KSP for Room library
1 parent c0c140c commit bb76cd5

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apply plugin: "com.android.application"
22
apply plugin: "kotlin-android"
33
apply plugin: "kotlin-kapt"
4+
apply plugin: "com.google.devtools.ksp"
45
apply plugin: "androidx.navigation.safeargs.kotlin"
56
apply plugin: "kotlinx-serialization"
67
apply plugin: "org.jetbrains.kotlin.plugin.parcelize"
@@ -220,7 +221,7 @@ dependencies {
220221
implementation "androidx.viewpager2:viewpager2:1.1.0"
221222
implementation "androidx.datastore:datastore-preferences:1.1.2"
222223
implementation "androidx.core:core-splashscreen:1.0.1"
223-
kapt "androidx.room:room-compiler:$room_version"
224+
ksp "androidx.room:room-compiler:$room_version"
224225

225226
// Compose
226227
implementation "androidx.compose.ui:ui-android:1.7.6"

app/src/main/java/io/github/sds100/keymapper/data/db/typeconverter/ActionListTypeConverter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ class ActionListTypeConverter {
1919
}
2020

2121
@TypeConverter
22-
fun toJsonString(actionList: MutableList<ActionEntity>): String = Gson().toJson(actionList)!!
22+
fun toJsonString(actionList: List<ActionEntity>): String = Gson().toJson(actionList)!!
2323
}

app/src/main/java/io/github/sds100/keymapper/data/db/typeconverter/ConstraintListTypeConverter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ class ConstraintListTypeConverter {
1414
fun toConstraintList(json: String) = Gson().fromJson<MutableList<ConstraintEntity>>(json)
1515

1616
@TypeConverter
17-
fun toJsonString(constraintList: MutableList<ConstraintEntity>) =
17+
fun toJsonString(constraintList: List<ConstraintEntity>) =
1818
Gson().toJson(constraintList)!!
1919
}

app/src/main/java/io/github/sds100/keymapper/data/db/typeconverter/ExtraListTypeConverter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ class ExtraListTypeConverter {
1414
fun toExtraObject(string: String) = Gson().fromJson<MutableList<Extra>>(string)
1515

1616
@TypeConverter
17-
fun toString(extras: MutableList<Extra>) = Gson().toJson(extras)!!
17+
fun toString(extras: List<Extra>) = Gson().toJson(extras)!!
1818
}

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ buildscript {
1818
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1919
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
2020
classpath "org.jetbrains.kotlin.plugin.compose:org.jetbrains.kotlin.plugin.compose.gradle.plugin:2.0.21"
21+
classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:2.0.21-1.0.27"
2122
// NOTE: Do not place your application dependencies here; they belong
2223
// in the individual module build.gradle files
2324
}

0 commit comments

Comments
 (0)