gradle: Factor out the dependency versions to a build-wide variable

This commit is contained in:
Ryan Pavlik 2020-11-12 09:22:07 -06:00 committed by Lubosz Sarnecki
parent 4d45bfeb1b
commit 23e01fc656
4 changed files with 22 additions and 9 deletions

View file

@ -2,8 +2,19 @@
// SPDX-License-Identifier: BSL-1.0
buildscript {
ext.kotlin_version = '1.4.10'
ext.latestAboutLibsRelease = "8.5.0"
ext {
kotlinVersion = '1.4.10'
latestAboutLibsRelease = "8.5.0"
androidxCoreVersion = "1.3.2"
androidxAnnotationVersion = "1.1.0"
androidxAppCompatVersion = "1.2.0"
androidxLifecycleVersion = "2.2.0"
androidxConstraintLayoutVersion = '2.0.4'
// Saw some breakage when updating to 1.2?
materialVersion = "1.1.0"
}
repositories {
google()
jcenter()
@ -11,7 +22,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAboutLibsRelease}"
}
}

View file

@ -26,5 +26,5 @@ android {
}
dependencies {
implementation 'androidx.annotation:annotation:1.1.0'
implementation "androidx.annotation:annotation:$androidxAnnotationVersion"
}

View file

@ -28,5 +28,5 @@ android {
dependencies {
implementation project(':src:xrt:auxiliary:android')
implementation 'androidx.annotation:annotation:1.1.0'
implementation "androidx.annotation:annotation:$androidxAnnotationVersion"
}

View file

@ -132,13 +132,15 @@ aboutLibraries {
dependencies {
outOfProcessImplementation project(':src:xrt:ipc:android')
implementation project(':src:xrt:auxiliary:android')
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.constraintlayout:constraintlayout:2.0.3'
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation "androidx.constraintlayout:constraintlayout:$androidxConstraintLayoutVersion"
implementation "com.google.android.material:material:$materialVersion"
// Dependencies related only to AboutLibraries
implementation "com.mikepenz:aboutlibraries-core:${latestAboutLibsRelease}"
implementation "com.mikepenz:aboutlibraries:${latestAboutLibsRelease}"
implementation "androidx.cardview:cardview:1.*.*"
implementation "androidx.recyclerview:recyclerview:1.1.*"
implementation "com.google.android.material:material:1.1.*"
}