[android] Migrate to version catalog

Signed-off-by: jeanbaptisteC <jeanbaptistec@noreply.codeberg.org>
Co-authored by: Harry Bond <me@hbond.xyz>
This commit is contained in:
Jean-Baptiste
2025-05-12 22:09:35 +02:00
committed by Konstantin Pastbin
parent 49beb50f7b
commit e98d506207
3 changed files with 73 additions and 34 deletions

View File

@@ -22,19 +22,19 @@ buildscript {
googleFirebaseServicesDefault
dependencies {
classpath 'com.android.tools.build:gradle:8.7.3'
classpath libs.android.tools
if (googleFirebaseServicesEnabled) {
println('Building with Google Firebase Services')
classpath 'com.google.gms:google-services:4.4.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'
classpath 'com.google.firebase:firebase-appdistribution-gradle:5.0.0'
classpath libs.google.services
classpath libs.google.firebase.crashlytics
classpath libs.google.firebase.appdistribution
} else {
println('Building without Google Firebase Services')
}
classpath('com.github.triplet.gradle:play-publisher:3.10.1')
classpath('ru.cian:huawei-publish-gradle-plugin:1.4.2')
classpath(libs.triplet.play.publisher)
classpath(libs.huawei.publish)
}
}
@@ -366,7 +366,7 @@ android {
}
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
coreLibraryDesugaring libs.android.tools.desugar
// Google Play Location Services
//
@@ -377,17 +377,17 @@ dependencies {
// ls -la src/$flavor/java/app/organicmaps/location/GoogleFusedLocationProvider.java
// ```
//
webImplementation 'com.google.android.gms:play-services-location:21.3.0'
googleImplementation 'com.google.android.gms:play-services-location:21.3.0'
huaweiImplementation 'com.google.android.gms:play-services-location:21.3.0'
webImplementation libs.google.services.location
googleImplementation libs.google.services.location
huaweiImplementation libs.google.services.location
// This is the microG project's re-implementation which is permissible on
// F-droid because it's Apache-2.0.
fdroidImplementation 'org.microg.gms:play-services-location:0.3.6.244735'
fdroidImplementation libs.microg.services.location
// Google Firebase Services
if (googleFirebaseServicesEnabled) {
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:33.5.1')
implementation platform(libs.google.firebase.bom)
// Add the dependencies for the Crashlytics and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-crashlytics'
@@ -398,30 +398,30 @@ dependencies {
// > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
// We don't use Kotlin, but some dependencies are actively using it.
// See https://stackoverflow.com/a/75719642
implementation 'androidx.core:core:1.15.0'
implementation(platform('org.jetbrains.kotlin:kotlin-bom:2.1.10'))
implementation 'androidx.annotation:annotation:1.9.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.car.app:app:1.7.0-rc01'
implementation 'androidx.car.app:app-projected:1.7.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation 'androidx.fragment:fragment:1.8.5'
implementation 'androidx.preference:preference:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.work:work-runtime:2.10.0'
implementation 'androidx.lifecycle:lifecycle-process:2.8.7'
implementation 'com.google.android.material:material:1.12.0'
implementation libs.androidx.core
implementation(platform(libs.jetbrains.kotlin.bom))
implementation libs.androidx.annotation
implementation libs.androidx.appcompat
implementation libs.androidx.car.app
implementation libs.androidx.car.app.projected
implementation libs.androidx.constraintlayout
implementation libs.androidx.fragment
implementation libs.androidx.preference
implementation libs.androidx.recyclerview
implementation libs.androidx.work.runtime
implementation libs.androidx.lifecycle.process
implementation libs.android.material
// Fix for app/organicmaps/util/FileUploadWorker.java:14: error: cannot access ListenableFuture
// https://github.com/organicmaps/organicmaps/issues/6106
implementation 'com.google.guava:guava:33.3.0-android'
implementation 'com.github.devnullorthrow:MPAndroidChart:3.2.0-alpha'
implementation 'net.jcip:jcip-annotations:1.0'
implementation libs.google.guava
implementation libs.devnullorthrow.mpandroidchart
implementation libs.jcip.annotations
// Test Dependencies
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.15.2'
testImplementation 'org.mockito:mockito-inline:5.2.0'
androidTestImplementation libs.androidx.test.junit
testImplementation libs.junit
testImplementation libs.mockito.core
testImplementation libs.mockito.inline
}
tasks.withType(JavaCompile) {