android-studiogradleandroid-proguardgoogle-play-console

Automatically upload ProGuard mapping files to play console


Is pretty annoying to upload the ProGuard mapping files to google play console everytime i need to build a new version of my apk (my gradle build generate 4 different apks for every release so i do need to upload 4 different mapping files)

I was wondering if is possible to make this process automatically then i found this article

https://developers.google.com/android-publisher/api-ref/edits/deobfuscationfiles/upload

So google does have an api to upload the mapping files, is there any gradle plugin to work with? is there any easy way to integrate?


Solution

  • Suggestion: If you publish an Android App Bundle instead of APKs, the deobfuscation mapping file will be uploaded automatically with your artifact so you don't have to do it separately.

    For the curious, the mapping file is located at BUNDLE-METADATA/com.android.tools.build.obfuscation/proguard.map in AAB (which is, like the APK format, just a ZIP file).