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

Automatically add maven repository for react-native AARs #334

Closed fractalwrench closed 4 years ago

fractalwrench commented 4 years ago

Goal

Automatically adds a maven repository for the directory in the @bugsnag/react-native node_module which contains the bugsnag-android AARs. This simplifies the setup for React Native apps using bugsnag, as they will no longer need to add bugsnag-react-native.gradle in their build scripts.

The repository is added for any project using react-native as it is required for the app to compile.

Testing

Ran the example react-native app in the following scenarios:

  1. current instructions: apply from: "../../node_modules/@bugsnag/react-native/bugsnag-react-native.gradle"
  2. no plugin or current instructions
  3. the bugsnag plugin applied to the project

The build failed for 2 which confirms that the plugin picks up the AARs in the node module.

fractalwrench commented 4 years ago

@imjoehaines I've integrated bugsnag into the react-native test fixtures, so compilation of the E2E scenarios would now fail if the plugin couldn't pick up the AARs.