Skip to content

:app:uploadCrashlyticsMappingFileRelease build task fails after upgrading to crashlytics plugin version 3.0.1 #5962

@SkillsDelivery

Description

@SkillsDelivery

Environment:

  • Android Studio version: Jellyfish (2023.3.1)
  • Firebase Component: Crashlytics
  • Component version: 3.0.1

Problem description:

I just upgraded the version of "com.google.firebase.crashlytics" plugin from "2.9.9" to "3.0.1" and the build started to fail.
Here is the build command which is failing:

./gradlew --parallel assemble

The build succeeds if I build only one build type at a time by running either

./gradlew --parallel assembleDebug

or

./gradlew --parallel assembleRelease

Logs:

> Task :app:uploadCrashlyticsMappingFileRelease FAILED
...
FAILURE: Build failed with an exception.
...
* What went wrong:
A problem was found with the configuration of task ':app:uploadCrashlyticsMappingFileRelease' (type 'UploadMappingFileTask').
  - Gradle detected a problem with the following location: 'C:\dev\coffee-beans\projects\quick-list-app\app\build\gmpAppId.txt'.

    Reason: Task ':app:uploadCrashlyticsMappingFileRelease' uses this output of task ':app:processDebugGoogleServices' without declaring an explicit or implicit dependency. This can lead to incorrect results being produc
ed, depending on what order the tasks are executed.

    Possible solutions:
      1. Declare task ':app:processDebugGoogleServices' as an input of ':app:uploadCrashlyticsMappingFileRelease'.
      2. Declare an explicit dependency on ':app:processDebugGoogleServices' from ':app:uploadCrashlyticsMappingFileRelease' using Task#dependsOn.
      3. Declare an explicit dependency on ':app:processDebugGoogleServices' from ':app:uploadCrashlyticsMappingFileRelease' using Task#mustRunAfter.

    For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

Relevant Code:

"com.google.gms.google-services" version: "4.4.1"
"com.google.firebase:firebase-bom" version: "33.0.0"

Relevant parts of my app/build.gradle.kts file:

plugins {
    ...
    alias(libs.plugins.google.services)
    alias(libs.plugins.firebase.crashlytics)
   ...
}

android {
    ...
   buildTypes {
        debug {
            isDebuggable = true
            isMinifyEnabled = false
            manifestPlaceholders["crashlyticsCollectionEnabled"] = "false"
            configure<CrashlyticsExtension> { mappingFileUploadEnabled = false }
        }
        release {
            isDebuggable = false
            isMinifyEnabled = true
            proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
            manifestPlaceholders["crashlyticsCollectionEnabled"] = "true"
            configure<CrashlyticsExtension> { mappingFileUploadEnabled = true }
        }
    }
}
...

Relevant parts of my AndroidManifest.xml file:

    <application ...>
        ...
        <meta-data
            android:name="firebase_crashlytics_collection_enabled"
            android:value="${crashlyticsCollectionEnabled}" />
        ...
    </application>

Releavant parts of my proguard-rules.pro file:

...
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions