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

Add warning in BAGP for React Native when running via react-native CLI #357

Closed fractalwrench closed 3 years ago

fractalwrench commented 3 years ago

Goal

Adds a warning when installRelease is run in React Native. This indicates that the user ran react-native run-android --variant=release, whereas a user should run ./gradlew assembleRelease or ./gradlew bundleRelease to generate an artifact for which sourcemaps should be uploaded. This warning is only logged when a task named 'installRelease' is created in the project and JS sourcemap upload is enabled.

Testing

Ran ./gradlew assembleRelease and react-native run-android to confirm no message was received, and that the warning was only logged for react-native run-android --variant=release

fractalwrench commented 3 years ago

Addressed feedback, and additionally caught an exception which was failing the E2E tests.