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

Avoid release build failure for invalid API key #381

Closed IslamSalah closed 3 years ago

IslamSalah commented 3 years ago

Goal

On integrating bugsnag-android-gradle-plugin to upload mappings at the build time, our release builds fail on having invalid api key. Normally the valid api key is fed to a placeholder so it can be accessible only in specific setups but invalid in others.

Design

Ths proposed change should prevent failing release builds in setups where the api key shouldn't be accessible. It increases the flexibility of the plugin usage regardless having a valid/invalid api-key while at the same time retain logging errors if any.

Changeset

Similar to the case now in bugsnag-android, where an invalid api-key, example, prevent sending events to the dashboard without failing builds. The proposed change stops concerned exceptions

Testing

Automated tests should pass normally. Below screenshots might give more visibility

Before change

before

After change

after
IslamSalah commented 3 years ago

On trying to fix the tests, I found the feature already implemented failOnUploadError