chore: Use gradle variables

parent 37a573e5
......@@ -39,10 +39,15 @@ android {
}
}
ext {
roomVersion = '1.1.1'
archLifecycleVersion = '1.1.1'
}
dependencies {
// region Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt "android.arch.lifecycle:compiler:1.1.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
kapt "android.arch.lifecycle:compiler:$archLifecycleVersion"
// endregion
// region Support Library
......@@ -52,17 +57,18 @@ dependencies {
// endregion
// 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
//implementation "android.arch.lifecycle:viewmodel:1.1.0"
//implementation "android.arch.lifecycle:viewmodel:$archLifecycleVersion"
// alternatively, just LiveData
//implementation "android.arch.lifecycle:livedata:1.1.0"
//implementation "android.arch.lifecycle:livedata:$archLifecycleVersion"
// endregion
// region Jetpack / Developer Experience
// Room
implementation "android.arch.persistence.room:runtime:1.1.1"
kapt "android.arch.persistence.room:compiler:1.1.1"
implementation "android.arch.persistence.room:runtime:$roomVersion"
kapt "android.arch.persistence.room:compiler:$roomVersion"
// Paging
implementation "android.arch.paging:runtime:1.0.1"
......@@ -79,6 +85,6 @@ dependencies {
testImplementation "android.arch.core:core-testing:1.1.1"
// Test helpers for Room
testImplementation "android.arch.persistence.room:testing:1.1.1"
testImplementation "android.arch.persistence.room:testing:$roomVersion"
// endregion
}
......@@ -18,14 +18,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.0'
ext.kotlinVersion = '1.3.0'
repositories {
google()
jcenter()
}
dependencies {
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
// 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