plugin-expo-eas-sourcemaps is incompatible with Expo 48 due to the issue with BAGP and RN 0.71
This PR updates the plugin for SDK 48 by using Expo’s eas-build-on-success hook to upload Android source maps instead of installing BAGP into the native project.
iOS source maps are still uploaded by the native build using the pre-existing config plugin.
Design
The plugin now exposes a script bugsnag-eas-build-on-success that can be added to the eas-build-on-success build hook in a project's package.json, e.g.
The script reads the project's Bugsnag API key from the app.json file and exits with an error if it fails to find the source map file or API key (this mirrors the behaviour of the plugin's iOS script).
The script relies on the source map and bundle files being generated in a consistent path relative to the project root:
bundle: android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle
source map: android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
The CLI tool has been updated so that the init and upload-sourcemaps commands will add the necessary hook into the project's package.json
Testing
Manually tested local and remote EAS builds
Added unit tests for configuration via the CLI tool
Goal
plugin-expo-eas-sourcemaps
is incompatible with Expo 48 due to the issue with BAGP and RN 0.71This PR updates the plugin for SDK 48 by using Expo’s
eas-build-on-success
hook to upload Android source maps instead of installing BAGP into the native project.iOS source maps are still uploaded by the native build using the pre-existing config plugin.
Design
The plugin now exposes a script
bugsnag-eas-build-on-success
that can be added to theeas-build-on-success
build hook in a project'spackage.json
, e.g.The script reads the project's Bugsnag API key from the
app.json
file and exits with an error if it fails to find the source map file or API key (this mirrors the behaviour of the plugin's iOS script).The script relies on the source map and bundle files being generated in a consistent path relative to the project root: bundle:
android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle
source map:android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
The CLI tool has been updated so that the
init
andupload-sourcemaps
commands will add the necessary hook into the project'spackage.json
Testing