From 66f44ef87d93303b8e48eb7be82a0f7932b4e13e Mon Sep 17 00:00:00 2001 From: J-Jamet Date: Tue, 16 Nov 2021 12:48:38 +0100 Subject: [PATCH] Encapsulate lib version through modules --- app/build.gradle | 11 +++++------ build.gradle | 4 ++++ crypto/build.gradle | 10 +++++----- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3712761f2..159ded9bf 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -103,7 +103,7 @@ def room_version = "2.3.0" dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.2.0' + implementation "androidx.appcompat:appcompat:$android_appcompat_version" implementation 'androidx.preference:preference-ktx:1.1.1' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.1' @@ -111,10 +111,9 @@ dependencies { implementation 'androidx.documentfile:documentfile:1.0.1' implementation 'androidx.biometric:biometric:1.1.0' // Lifecycle - LiveData - ViewModel - Coroutines - implementation "androidx.core:core-ktx:1.3.2" + implementation "androidx.core:core-ktx:$android_core_version" implementation 'androidx.fragment:fragment-ktx:1.2.5' - // WARNING: Don't upgrade because slowdown https://github.com/Kunzisoft/KeePassDX/issues/923 - implementation 'com.google.android.material:material:1.1.0' + implementation "com.google.android.material:material:$android_material_version" // Database implementation "androidx.room:room-runtime:$room_version" kapt "androidx.room:room-compiler:$room_version" @@ -136,6 +135,6 @@ dependencies { implementation project(path: ':icon-pack-material') // Tests - androidTestImplementation 'androidx.test:runner:1.4.0' - androidTestImplementation 'androidx.test:rules:1.4.0' + androidTestImplementation "androidx.test:runner:$android_test_version" + androidTestImplementation "androidx.test:rules:$android_test_version" } diff --git a/build.gradle b/build.gradle index eaec51b79..f4fa90dd1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,10 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = '1.4.32' + ext.android_core_version = '1.3.2' + ext.android_appcompat_version = '1.2.0' + ext.android_material_version = '1.3.0' + ext.android_test_version = '1.4.0' repositories { mavenCentral() google() diff --git a/crypto/build.gradle b/crypto/build.gradle index a1cfb7773..07db3064f 100644 --- a/crypto/build.gradle +++ b/crypto/build.gradle @@ -43,12 +43,12 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'androidx.core:core-ktx:1.3.2' - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.3.0' + implementation "androidx.core:core-ktx:$android_core_version" + implementation "androidx.appcompat:appcompat:$android_appcompat_version" + implementation "com.google.android.material:material:$android_material_version" // Crypto implementation 'org.bouncycastle:bcprov-jdk15on:1.65.01' - androidTestImplementation 'androidx.test:runner:1.3.0' - androidTestImplementation 'androidx.test:rules:1.3.0' + androidTestImplementation "androidx.test:runner:$android_test_version" + androidTestImplementation "androidx.test:rules:$android_test_version" }