diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index fcd63ad..f43ed42 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,6 +1,7 @@ plugins { id("com.android.application") id("kotlin-android") + id("kotlin-kapt") } android { @@ -18,12 +19,24 @@ android { vectorDrawables { useSupportLibrary = true } + javaCompileOptions { + annotationProcessorOptions { + arguments.putAll(mapOf( + "room.schemaLocation" to "$projectDir/schemas", + "room.incremental" to "true", + "room.expandProjection" to "true" + )) + } + } } buildTypes { release { isMinifyEnabled = false - proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) } } compileOptions { @@ -49,7 +62,10 @@ dependencies { implementation(libs.material) implementation(libs.bundles.compose) implementation(libs.lifecycle) + implementation(libs.room.ktx) + kapt(libs.room.kapt) testImplementation(libs.junit) + testImplementation(libs.room.test) androidTestImplementation(libs.test.ext) androidTestImplementation(libs.espresso) androidTestImplementation(libs.compose.test) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0809964..78cf2b1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,6 +5,7 @@ compose = "1.0.0-beta05" espresso = "3.3.0" kotlin = "1.5.0" material = "1.3.0" +room = "2.3.0" [libraries] androidx-core = { module = "androidx.core:core-ktx", version.ref = "androidx-core" } @@ -14,12 +15,15 @@ compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" } compose-material = { module = "androidx.compose.material:material", version.ref = "compose" } compose-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" } compose-activity = { module = "androidx.activity:activity-compose", version = "1.3.0-alpha07" } -compose-test = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose"} +compose-test = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose" } lifecycle = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version = "2.3.1" } junit = { module = "junit:junit", version = "4.12" } -kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin"} +kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" } +room-kapt = { module = "androidx.room:room-compiler", version.ref = "room" } +room-test = { module = "androidx.room:room-testing", version.ref = "room" } test-ext = { module = "androidx.text.ext:junit", version = "1.1.2" } -espresso = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso"} +espresso = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" } [bundles] compose = ["compose-ui", "compose-material", "compose-tooling", "compose-activity"]