From 0b5d7a1624ebd5b04d60c9a28f48fd601a8088be Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 27 Aug 2020 15:33:02 +0530 Subject: [PATCH] Add room dependencies and sort Signed-off-by: Harsh Shandilya --- app/build.gradle | 15 ++++++++++++++- build.gradle | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index e51eb485..2a8994b3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.application' id 'kotlin-android' + id 'kotlin-kapt' } android { @@ -14,6 +15,15 @@ android { versionCode 1 versionName "1.0" + javaCompileOptions { + annotationProcessorOptions { + arguments = [ + "room.incremental" : "true", + "room.expandProjection": "true" + ] + } + } + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -45,9 +55,9 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { dependencies { + kapt "androidx.room:room-compiler:$room_version" implementation 'androidx.core:core-ktx:1.5.0-alpha02' implementation 'androidx.appcompat:appcompat:1.3.0-alpha02' - implementation 'com.google.android.material:material:1.3.0-alpha02' implementation "androidx.compose.foundation:foundation:$compose_version" implementation "androidx.compose.foundation:foundation-layout:$compose_version" implementation "androidx.compose.foundation:foundation-text:$compose_version" @@ -58,7 +68,10 @@ dependencies { implementation "androidx.compose.ui:ui-text:$compose_version" implementation "androidx.compose.ui:ui-text-android:$compose_version" implementation "androidx.compose.ui:ui-unit:$compose_version" + implementation "androidx.room:room-runtime:$room_version" + implementation "androidx.room:room-ktx:$room_version" implementation "androidx.ui:ui-tooling:$compose_version" + implementation 'com.google.android.material:material:1.3.0-alpha02' testImplementation 'junit:junit:4.13' androidTestImplementation 'androidx.test.ext:junit:1.1.2-rc03' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-rc03' diff --git a/build.gradle b/build.gradle index 43aa6cec..4ab4194f 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,7 @@ buildscript { ext { compose_version = '1.0.0-alpha01' + room_version = '2.3.0-alpha02' } ext.kotlin_version = "1.4.0" repositories {