bugsnag / bugsnag-android-gradle-plugin

Gradle plugin for BugSnag which uploads ProGuard, DexGuard and NDK mapping files, and sends build notifications
https://docs.bugsnag.com/build-integrations/gradle/
MIT License
70 stars 38 forks source link

Fix task ordering for upload task on AGP 3.5 #300

Closed fractalwrench closed 4 years ago

fractalwrench commented 4 years ago

Goal

Fixes the task ordering for the bugsnag upload tasks to enforce that it must run after the package task which produces the APK/AAB. This dependency was not explicitly specified and resulted in the JVM upload task failing with the following exception:

java.lang.IllegalStateException: Expected file collection to contain exactly one file, however, it contains no files.

This was caused by the fact that the JVM upload task on AGP 3.5 executed before the package task, and so the mapping file was not present. Explicitly adding a task ordering fixes this issue.

Changeset

Testing

Enabled skipped E2E scenarios for AGP 3.5.