Reputation: 3535
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?
Upvotes: 8
Views: 3400
Reputation: 17437
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).
Upvotes: 25
Reputation: 76789
when you have Crashlytics set up, this is being explained here. there's also a Play Publisher Plugin for Gradle, while it does no seem to upload the mapping.txt
. if you want to use that API, it should be easy to extend eg. the Google Cloud PHP Client with another API endpoint.
Upvotes: 0
Reputation: 1126
you can write a gradle build script to run tasks after build complees
and then you can use something like this file upload plugin to upload the file to the url
Upvotes: 0