ylliX - Online Advertising Network
Disabling mapping file uploads with Crashlytics

Disabling mapping file uploads with Crashlytics


One of the more famous crash reporting tools used in Android development is probably Crashlytics. It offers up a lot of insight into an app’s performance – from device characteristics to insights on issue commonalities. If, like my current project, obfuscation is enabled in an app, Crashlytics has a Gradle plugin that uploads the mapping file so that we end up with readable crash reports.

There are times though where I may not want to upload the mapping file, like if I am just debugging an issue locally. According to the official documentation, the way to do this is to add this configuration to the build.gradle.kts file:

firebaseCrashlytics {
    mappingFileUploadEnabled = false
}

However, when I tried it with v2.8.1 of the Crashlytics Gradle plugin, I get an unresolved reference error:



Unresolved reference error

The correct syntax for Kotlin Gradle DSL is somewhat buried in a comment in this Github issue:

import com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension

buildTypes{
    getByName("debug") {
        ...
        configure<CrashlyticsExtension> {
            mappingFileUploadEnabled = false 
        }
    }
}

It’s unfortunate that the official documentation hasn’t been updated in the eight months since this issue has been known (apparently it appeared in v2.6.0 of the plugin), but such is life. :crying_cat_face:



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *