From 6b12ecfd7af8db1f796b7cba37c2220433e38a79 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Wed, 25 Oct 2023 18:39:31 +0200 Subject: [PATCH] fix(deps): update androidx.room to v2.6.0 (#198) Enable Kotlin code generation, and use the new room plugin to generate schemas in a reproducible/cacheable way. --- app/build.gradle | 7 ++++++- gradle/libs.versions.toml | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index b75dfa401..6779413bf 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,6 +5,7 @@ plugins { alias(libs.plugins.kotlin.parcelize) alias(libs.plugins.aboutlibraries) alias(libs.plugins.hilt) + alias(libs.plugins.room) id "app.pachli.plugins.markdown2resource" } @@ -122,9 +123,13 @@ android { } } +room { + schemaDirectory("$projectDir/schemas/") +} + ksp { - arg("room.schemaLocation", "$projectDir/schemas") arg("room.incremental", "true") + arg("room.generateKotlin", "true") } configurations { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7f53510a4..1c5c6701a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -22,7 +22,7 @@ androidx-testing = "2.2.0" androidx-test-core-ktx = "1.5.0" androidx-viewpager2 = "1.0.0" androidx-work = "2.8.1" -androidx-room = "2.5.2" +androidx-room = "2.6.0" autodispose = "2.2.1" bouncycastle = "1.70" conscrypt = "2.5.2" @@ -65,6 +65,7 @@ hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } ktlint = "org.jlleitschuh.gradle.ktlint:11.6.1" +room = { id = "androidx.room", version.ref = "androidx-room" } [libraries] aboutlibraries-core = { module = "com.mikepenz:aboutlibraries-core", version.ref = "aboutlibraries" }