[android] Update gradle plugin and other dependencies #5877

Merged
biodranik merged 2 commits from ab-android-gradle into master 2023-09-01 06:56:53 +00:00
4 changed files with 13 additions and 12 deletions

View file

@ -26,7 +26,7 @@ buildscript {
ext.googleFirebaseServicesEnabled = project.hasProperty('firebase') ?: googleFirebaseServicesDefault
dependencies {
classpath 'com.android.tools.build:gradle:8.1.0'
classpath 'com.android.tools.build:gradle:8.1.1'
if (googleMobileServicesEnabled) {
println('Building with Google Mobile Services')
@ -37,13 +37,13 @@ buildscript {
if (googleFirebaseServicesEnabled) {
println('Building with Google Firebase Services')
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.5'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
classpath 'com.google.firebase:firebase-appdistribution-gradle:4.0.0'
} else {
println('Building without Google Firebase Services')
}
classpath('com.github.triplet.gradle:play-publisher:3.8.3')
classpath('com.github.triplet.gradle:play-publisher:3.8.4')
classpath('ru.cian:huawei-publish-gradle-plugin:1.4.0')
}
}
@ -75,7 +75,7 @@ dependencies {
// Google Firebase Services
if (googleFirebaseServicesEnabled) {
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:32.1.0')
implementation platform('com.google.firebase:firebase-bom:32.2.3')
// 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'
@ -85,14 +85,14 @@ dependencies {
// This line is added as a workaround for duplicate classes error caused by some outdated dependency:
// > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
// We don't use Kotlin, but some dependencies are actively using it.
implementation(platform('org.jetbrains.kotlin:kotlin-bom:1.8.21'))
implementation 'androidx.core:core:1.10.1'
// See https://stackoverflow.com/a/75719642
implementation(platform('org.jetbrains.kotlin:kotlin-bom:1.9.10'))
implementation 'androidx.annotation:annotation:1.6.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.fragment:fragment:1.5.7'
implementation 'androidx.preference:preference:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.3.0'
implementation 'androidx.fragment:fragment:1.6.1'
implementation 'androidx.preference:preference:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'androidx.work:work-runtime:2.8.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.code.gson:gson:2.10.1'
@ -101,7 +101,7 @@ dependencies {
// Test Dependencies
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.3.1'
testImplementation 'org.mockito:mockito-core:5.5.0'
testImplementation 'org.mockito:mockito-inline:5.2.0'
}

Binary file not shown.

View file

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
Review

Do we really need to switch to fresh major versions immediately after their release?
Maybe consider a more conservative approach and wait for at least one maintenance release being out.

(we've been hit by bugs in fresh updates already, the one that comes to my mind was related to a new agp version and r8 shrinker)

Do we really need to switch to fresh major versions immediately after their release? Maybe consider a more conservative approach and wait for at least one maintenance release being out. (we've been hit by bugs in fresh updates already, the one that comes to my mind was related to a new agp version and r8 shrinker)
Review

It doesn't hurt, but in general, I agree with you.

It doesn't hurt, but in general, I agree with you.
biodranik commented 2023-09-01 05:52:17 +00:00 (Migrated from github.com)
Review

There is also an opposite issue I see often with Android: a late upgrade consumes too much time for the team to properly support it. So there should be a balance.

There is also an opposite issue I see often with Android: a late upgrade consumes too much time for the team to properly support it. So there should be a balance.
biodranik commented 2023-09-01 05:52:51 +00:00 (Migrated from github.com)
Review

What R8 bug do you have in mind btw? When was it?

What R8 bug do you have in mind btw? When was it?
Review
https://git.omaps.dev/organicmaps/organicmaps/pulls/2718
biodranik commented 2023-09-02 21:10:00 +00:00 (Migrated from github.com)
Review

@pastk it's another case. We didn't have a choice, Google forced everyone to use R8.

@pastk it's another case. We didn't have a choice, Google forced everyone to use R8.
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

3
android/gradlew vendored
View file

@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum