Support automatic upload when building App Bundles #137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
v3.2.0 of the Android Gradle Plugin (AGP) introduced App Bundles, a new upload format which delegates the generation of APKs to the Google Play store, and which allows dynamic delivery of feature module APKs.
The task used to generate the App Bundle does not trigger the Bugsnag plugin's mapping file upload or build API tasks automatically - this changeset fixes that.
Changeset
The changes are best viewed by looking at the individual commits:
The mazerunner example app fixture was updated to use AGP v3.2.1 to enable building App Bundles. This upgrade also required updating the gradle wrapper for the fixture to 4.6 (the minimum supported), and explicitly stating that all ABIs should be built (mips, mips64, and armeabi were disabled by default in v3.2.0).
Mazerunner scenarios were added for several App Bundle project setups:
These scenarios are broadly the same as the ones used to test
assemble
tasks.assemble
tasks was updated to also includebundle
tasks. This in turn adds a task dependency between eachbundle
task and our upload tasks which ensures they automatically run.For example, in our previous gradle plugin, the following tasks would be expected to trigger a mapping file upload, NDK upload, and Build API request:
whereas with these changes, the following tasks would also trigger this behaviour:
Tests
In addition to existing and new mazerunner scenarios, I confirmed that a crash from an APK generated from a bundle deobfuscates correctly on the dashboard. A guide on how to achieve this is available here: https://developer.android.com/guide/app-bundle/
Linked issues
Fixes #135