Skip to content

Commit

Permalink
Unable to modify Android gradle file with SDK 46 (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrandwijk authored Oct 8, 2022
1 parent 8f78e0f commit 742ff2c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

### 🐛 Bug fixes

- Added `expo` to `peerDependencies` to match own `peerDependencies` ([#286](https://github.com/expo/sentry-expo/pull/286) by [@SimenB](https://github.com/SimenB))
- Added `expo` to `peerDependencies` to match own `peerDependencies`. ([#286](https://github.com/expo/sentry-expo/pull/286) by [@SimenB](https://github.com/SimenB))
- Fix issue with config plugin being unable to modify Android gradle file with Expo 46. ([#290](https://github.com/expo/sentry-expo/pull/290)) by [@kbrandwijk](https://github.com/kbrandwijk))

### 🧹 Chores

Expand Down
2 changes: 1 addition & 1 deletion plugin/build/withSentryAndroid.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function modifyAppBuildGradle(buildGradle) {
if (buildGradle.includes('/sentry.gradle"')) {
return buildGradle;
}
const pattern = /(.*\/react\.gradle"\)?)(\s|\n|$)/;
const pattern = /(.*(\/|")react\.gradle"\)?)(\s|\n|$)/;
if (!buildGradle.match(pattern)) {
config_plugins_1.WarningAggregator.addWarningAndroid('sentry-expo', 'Could not find react.gradle script in android/app/build.gradle. Please open a bug report at https://github.com/expo/sentry-expo.');
}
Expand Down
4 changes: 2 additions & 2 deletions plugin/src/withSentryAndroid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export function modifyAppBuildGradle(buildGradle: string) {
if (buildGradle.includes('/sentry.gradle"')) {
return buildGradle;
}
const pattern = /(.*\/react\.gradle"\)?)(\s|\n|$)/;

const pattern = /(.*(\/|")react\.gradle"\)?)(\s|\n|$)/;
if (!buildGradle.match(pattern)) {
WarningAggregator.addWarningAndroid(
'sentry-expo',
Expand Down

0 comments on commit 742ff2c

Please sign in to comment.