Twelve: Add room
diff --git a/app/Android.bp b/app/Android.bp
index d993b12..dad3ac2 100644
--- a/app/Android.bp
+++ b/app/Android.bp
@@ -30,6 +30,10 @@
"preinstalled-packages-org.lineageos.twelve",
],
+ plugins: [
+ "androidx.room_room-compiler-plugin",
+ ],
+
static_libs: [
// DO NOT EDIT THIS SECTION MANUALLY
"kotlin-stdlib",
@@ -47,6 +51,8 @@
"androidx.navigation_navigation-fragment-ktx",
"androidx.navigation_navigation-ui-ktx",
"androidx.recyclerview_recyclerview",
+ "androidx.room_room-runtime",
+ "androidx.room_room-ktx",
"androidx.viewpager2_viewpager2",
"kotlinx_coroutines_guava",
"Twelve_com.google.android.material_material",
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index d41e09c..168cd53 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -9,6 +9,7 @@
plugins {
alias(libs.plugins.android.application)
+ alias(libs.plugins.kapt)
alias(libs.plugins.kotlin.android)
}
@@ -36,6 +37,12 @@
targetSdk = 35
versionCode = 1
versionName = "1.0"
+
+ kapt {
+ arguments {
+ arg("room.schemaLocation", "$projectDir/schemas")
+ }
+ }
}
buildTypes {
@@ -78,6 +85,10 @@
implementation(libs.androidx.navigation.fragment.ktx)
implementation(libs.androidx.navigation.ui.ktx)
implementation(libs.androidx.recyclerview)
+ implementation(libs.androidx.room.runtime)
+ annotationProcessor(libs.androidx.room.compiler)
+ kapt(libs.androidx.room.compiler)
+ implementation(libs.androidx.room.ktx)
implementation(libs.androidx.viewpager2)
implementation(libs.kotlinx.coroutines.guava)
implementation(libs.material)
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 8a59df3..bb396f0 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -17,6 +17,7 @@
media3 = "1.5.0-alpha01"
navigation = "2.8.0"
recyclerview = "1.3.2"
+room = "2.6.1"
viewpager2 = "1.1.0"
[libraries]
@@ -34,10 +35,14 @@
androidx-navigation-fragment-ktx = { group = "androidx.navigation", name = "navigation-fragment-ktx", version.ref = "navigation" }
androidx-navigation-ui-ktx = { group = "androidx.navigation", name = "navigation-ui-ktx", version.ref = "navigation" }
androidx-recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "recyclerview" }
+androidx-room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "room" }
+androidx-room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
+androidx-room-ktx = { group = "androidx.room", name = "room-ktx", version.ref = "room" }
androidx-viewpager2 = { group = "androidx.viewpager2", name = "viewpager2", version.ref = "viewpager2" }
kotlinx-coroutines-guava = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-guava", version.ref = "kotlinx-coroutines" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
+kapt = { id = "org.jetbrains.kotlin.kapt" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }