chore: Use gradle variables

parent 37a573e5
...@@ -39,10 +39,15 @@ android { ...@@ -39,10 +39,15 @@ android {
} }
} }
ext {
roomVersion = '1.1.1'
archLifecycleVersion = '1.1.1'
}
dependencies { dependencies {
// region Kotlin // region Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
kapt "android.arch.lifecycle:compiler:1.1.1" kapt "android.arch.lifecycle:compiler:$archLifecycleVersion"
// endregion // endregion
// region Support Library // region Support Library
...@@ -52,17 +57,18 @@ dependencies { ...@@ -52,17 +57,18 @@ dependencies {
// endregion // endregion
// region ViewModel and LiveData // region ViewModel and LiveData
implementation "android.arch.lifecycle:extensions:1.1.1" implementation "android.arch.lifecycle:extensions:$archLifecycleVersion"
kapt "android.arch.lifecycle:compiler:$archLifecycleVersion"
// alternatively, just ViewModel // alternatively, just ViewModel
//implementation "android.arch.lifecycle:viewmodel:1.1.0" //implementation "android.arch.lifecycle:viewmodel:$archLifecycleVersion"
// alternatively, just LiveData // alternatively, just LiveData
//implementation "android.arch.lifecycle:livedata:1.1.0" //implementation "android.arch.lifecycle:livedata:$archLifecycleVersion"
// endregion // endregion
// region Jetpack / Developer Experience // region Jetpack / Developer Experience
// Room // Room
implementation "android.arch.persistence.room:runtime:1.1.1" implementation "android.arch.persistence.room:runtime:$roomVersion"
kapt "android.arch.persistence.room:compiler:1.1.1" kapt "android.arch.persistence.room:compiler:$roomVersion"
// Paging // Paging
implementation "android.arch.paging:runtime:1.0.1" implementation "android.arch.paging:runtime:1.0.1"
...@@ -79,6 +85,6 @@ dependencies { ...@@ -79,6 +85,6 @@ dependencies {
testImplementation "android.arch.core:core-testing:1.1.1" testImplementation "android.arch.core:core-testing:1.1.1"
// Test helpers for Room // Test helpers for Room
testImplementation "android.arch.persistence.room:testing:1.1.1" testImplementation "android.arch.persistence.room:testing:$roomVersion"
// endregion // endregion
} }
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.3.0' ext.kotlinVersion = '1.3.0'
repositories { repositories {
google() google()
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.3.1' classpath 'com.android.tools.build:gradle:3.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment