Encapsulate lib version through modules

This commit is contained in:
J-Jamet
2021-11-16 12:48:38 +01:00
parent a0585d9b11
commit 66f44ef87d
3 changed files with 14 additions and 11 deletions

View File

@@ -103,7 +103,7 @@ def room_version = "2.3.0"
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" 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.preference:preference-ktx:1.1.1'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
@@ -111,10 +111,9 @@ dependencies {
implementation 'androidx.documentfile:documentfile:1.0.1' implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.biometric:biometric:1.1.0' implementation 'androidx.biometric:biometric:1.1.0'
// Lifecycle - LiveData - ViewModel - Coroutines // 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' 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:$android_material_version"
implementation 'com.google.android.material:material:1.1.0'
// Database // Database
implementation "androidx.room:room-runtime:$room_version" implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version" kapt "androidx.room:room-compiler:$room_version"
@@ -136,6 +135,6 @@ dependencies {
implementation project(path: ':icon-pack-material') implementation project(path: ':icon-pack-material')
// Tests // Tests
androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation "androidx.test:runner:$android_test_version"
androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation "androidx.test:rules:$android_test_version"
} }

View File

@@ -1,6 +1,10 @@
// 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.4.32' 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 { repositories {
mavenCentral() mavenCentral()
google() google()

View File

@@ -43,12 +43,12 @@ android {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2' implementation "androidx.core:core-ktx:$android_core_version"
implementation 'androidx.appcompat:appcompat:1.2.0' implementation "androidx.appcompat:appcompat:$android_appcompat_version"
implementation 'com.google.android.material:material:1.3.0' implementation "com.google.android.material:material:$android_material_version"
// Crypto // Crypto
implementation 'org.bouncycastle:bcprov-jdk15on:1.65.01' implementation 'org.bouncycastle:bcprov-jdk15on:1.65.01'
androidTestImplementation 'androidx.test:runner:1.3.0' androidTestImplementation "androidx.test:runner:$android_test_version"
androidTestImplementation 'androidx.test:rules:1.3.0' androidTestImplementation "androidx.test:rules:$android_test_version"
} }