Skip to content

Commit c81e67f

Browse files
authored
fix(ci): Consider build environment variables in expo sample app configuration (#4583)
1 parent 025d490 commit c81e67f

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
99
## Unreleased
1010

11+
### Fixes
12+
13+
- Considers the `SENTRY_DISABLE_AUTO_UPLOAD` and `SENTRY_DISABLE_NATIVE_DEBUG_UPLOAD` environment variables in the configuration of the Sentry Android Gradle Plugin for Expo plugin ([#4583](https://github.com/getsentry/sentry-react-native/pull/4583))
14+
1115
### Dependencies
1216

1317
- Bump Bundler Plugins from v3.2.0 to v3.2.1 ([#4585](https://github.com/getsentry/sentry-react-native/pull/4585))
@@ -27,7 +31,7 @@
2731

2832
```js
2933
import Sentry from "@sentry/react-native";
30-
34+
3135
Sentry.showFeedbackWidget();
3236

3337
Sentry.wrap(RootComponent);

packages/core/plugin/src/withSentryAndroidGradlePlugin.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ export function withSentryAndroidGradlePlugin(
8484
const sentryPlugin = `apply plugin: "io.sentry.android.gradle"`;
8585
const sentryConfig = `
8686
sentry {
87-
autoUploadProguardMapping = ${autoUploadProguardMapping}
87+
autoUploadProguardMapping = ${autoUploadProguardMapping ? 'shouldSentryAutoUpload()' : 'false'}
8888
includeProguardMapping = ${includeProguardMapping}
8989
dexguardEnabled = ${dexguardEnabled}
90-
uploadNativeSymbols = ${uploadNativeSymbols}
91-
autoUploadNativeSymbols = ${autoUploadNativeSymbols}
90+
uploadNativeSymbols = ${uploadNativeSymbols ? 'shouldSentryAutoUpload()' : 'false'}
91+
autoUploadNativeSymbols = ${autoUploadNativeSymbols ? 'shouldSentryAutoUpload()' : 'false'}
9292
includeNativeSources = ${includeNativeSources}
93-
includeSourceContext = ${includeSourceContext}
93+
includeSourceContext = ${includeSourceContext ? 'shouldSentryAutoUpload()' : 'false'}
9494
tracingInstrumentation {
9595
enabled = false
9696
}

packages/core/test/expo-plugin/withSentryAndroidGradlePlugin.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,13 @@ describe('withSentryAndroidGradlePlugin', () => {
138138
expect(modifiedGradle.modResults.contents).toContain('apply plugin: "io.sentry.android.gradle"');
139139
expect(modifiedGradle.modResults.contents).toContain(`
140140
sentry {
141-
autoUploadProguardMapping = true
141+
autoUploadProguardMapping = shouldSentryAutoUpload()
142142
includeProguardMapping = true
143143
dexguardEnabled = false
144-
uploadNativeSymbols = true
145-
autoUploadNativeSymbols = true
144+
uploadNativeSymbols = shouldSentryAutoUpload()
145+
autoUploadNativeSymbols = shouldSentryAutoUpload()
146146
includeNativeSources = false
147-
includeSourceContext = true
147+
includeSourceContext = shouldSentryAutoUpload()
148148
tracingInstrumentation {
149149
enabled = false
150150
}

0 commit comments

Comments
 (0)