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
When registering a task in BugsnagPlugin pass whether the task has been configured to run automatically to variant.register()
Remove registerAgp3/registerAgp4 methods as these do not have any function and appear to throw an exception on all tested AGP versions, resulting in a default fallback to registerManual
Wrap existing registerManual task dependencies in the autoRunTask flag, and configure the upload task to run automatically if required. This follows a similar approach to that taken in #294
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:
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
BugsnagPlugin
pass whether the task has been configured to run automatically tovariant.register()
registerAgp3/registerAgp4
methods as these do not have any function and appear to throw an exception on all tested AGP versions, resulting in a default fallback toregisterManual
registerManual
task dependencies in theautoRunTask
flag, and configure the upload task to run automatically if required. This follows a similar approach to that taken in #294Testing
Enabled skipped E2E scenarios for AGP 3.5.