Closed kbrandwijk closed 1 year ago
The previous injection point for the sentry.gradle script no longer exists in the SDK 48 app/build.gradle file, so we'll need to figure out a new anchor to inject the sentry gradle script. Relevant sentry-expo code: [https://github.com/expo/sentry-expo/blob/main/plugin/src/withSentryAndroid.ts#L44](https://github.com/expo/sentry-expo/blob/main/plugin/src/withSentryAndroid.ts#L44) SDK 47 template: [https://github.com/expo/expo/blob/sdk-47/templates/expo-template-bare-minimum/android/app/build.gradle#L92](https://github.com/expo/expo/blob/sdk-47/templates/expo-template-bare-minimum/android/app/build.gradle#L92) SDK 48 template: [https://github.com/expo/expo/blob/sdk-48/templates/expo-template-bare-minimum/android/app/build.gradle](https://github.com/expo/expo/blob/sdk-48/templates/expo-template-bare-minimum/android/app/build.gradle)
Checklist
Why
The app/build.gradle template changed in RN 0.71, breaking the sentry script injection because the old injection point doesn't exist anymore.
How
This change opts for a safer injection point, that is backwards compatible, and matches the sentry-wizard implementation.
Test Plan
Local testing, the result is as expected, in app/build.gradle: