diff --git a/CHANGELOG.md b/CHANGELOG.md index 086ec217d..93df97143 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,15 @@ ## Unreleased +### Fixes + +- Upload source maps for all splits on Android (not only the last found) ([#4125](https://github.com/getsentry/sentry-react-native/pull/4125)) + ### Dependencies +- Bump CLI from v2.36.6 to v2.37.0 ([#4153](https://github.com/getsentry/sentry-react-native/pull/4153)) + - [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2370) + - [diff](https://github.com/getsentry/sentry-cli/compare/2.36.6...2.37.0) - Bump JavaScript SDK from v8.30.0 to v8.33.1` ([#4154](https://github.com/getsentry/sentry-react-native/pull/4154)) - [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#8331) - [diff](https://github.com/getsentry/sentry-javascript/compare/v8.30.0...8.33.1) diff --git a/package.json b/package.json index 967cd82e0..7ce20b4e7 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "set-version-samples": "lerna run set-version" }, "devDependencies": { - "@sentry/cli": "2.36.6", + "@sentry/cli": "2.37.0", "downlevel-dts": "^0.11.0", "lerna": "^8.1.8", "npm-run-all2": "^6.2.2", diff --git a/packages/core/package.json b/packages/core/package.json index 7400ce043..cecb6b162 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -67,7 +67,7 @@ "dependencies": { "@sentry/babel-plugin-component-annotate": "2.20.1", "@sentry/browser": "8.33.1", - "@sentry/cli": "2.36.6", + "@sentry/cli": "2.37.0", "@sentry/core": "8.33.1", "@sentry/react": "8.33.1", "@sentry/types": "8.33.1", diff --git a/packages/core/sentry.gradle b/packages/core/sentry.gradle index 99f2bafdf..640f9a3b2 100644 --- a/packages/core/sentry.gradle +++ b/packages/core/sentry.gradle @@ -65,9 +65,6 @@ gradle.projectsEvaluated { def currentVariants = extractCurrentVariants(bundleTask, releases) if (currentVariants == null) return - def variant = null - def releaseName = null - def versionCode = null def previousCliTask = null def applicationVariant = null @@ -75,9 +72,9 @@ gradle.projectsEvaluated { def nameModulesCleanup = "${bundleTask.name}_SentryCollectModulesCleanUp" // Upload the source map several times if necessary: once for each release and versionCode. currentVariants.each { key, currentVariant -> - variant = currentVariant[0] - releaseName = currentVariant[1] - versionCode = currentVariant[2] + def variant = currentVariant[0] + def releaseName = currentVariant[1] + def versionCode = currentVariant[2] applicationVariant = currentVariant[3] try { diff --git a/samples/react-native/android/app/build.gradle b/samples/react-native/android/app/build.gradle index fc44dce5b..9dd92a396 100644 --- a/samples/react-native/android/app/build.gradle +++ b/samples/react-native/android/app/build.gradle @@ -145,6 +145,39 @@ android { keyPassword 'android' } } + + if (System.getenv('SENTRY_SAMPLE_ENABLE_ABI_SPLIT') == 'true') { + splits { + abi { + enable true + reset() + include 'x86', 'arm64-v8a' + universalApk true + } + } + project.ext.versionCodes = ['armeabi': 1, 'armeabi-v7a': 2, 'arm64-v8a': 3, 'mips': 5, 'mips64': 6, 'x86': 8, 'x86_64': 9] + android.applicationVariants.all { variant -> + variant.outputs.each { output -> + output.versionCodeOverride = + project.ext.versionCodes.get(output.getFilter( + com.android.build.OutputFile.ABI), 0) * 10000000 + android.defaultConfig.versionCode + } + } + } + + if (System.getenv('SENTRY_SAMPLE_ENABLE_FLAVORS') == 'true') { + flavorDimensions "version" + productFlavors { + regular { + dimension "version" + } + demo { + dimension "version" + applicationIdSuffix "demo" + } + } + } + buildTypes { debug { signingConfig signingConfigs.debug diff --git a/samples/react-native/package.json b/samples/react-native/package.json index 4d037bc63..5c07cfd49 100644 --- a/samples/react-native/package.json +++ b/samples/react-native/package.json @@ -17,7 +17,8 @@ "clean-ios": "cd ios; rm -rf Podfile.lock Pods build; cd ..", "clean-watchman": "watchman watch-del-all", "set-build-number": "npx react-native-version --skip-tag --never-amend --set-build", - "set-version": "npx react-native-version --skip-tag --never-amend" + "set-version": "npx react-native-version --skip-tag --never-amend", + "build-android-release-splits-flavors": "export SENTRY_SAMPLE_ENABLE_ABI_SPLIT=true; export SENTRY_SAMPLE_ENABLE_FLAVORS=true; cd android; ./gradlew assembleRelease; cd .." }, "dependencies": { "@react-navigation/bottom-tabs": "^6.5.12", diff --git a/yarn.lock b/yarn.lock index b308875b8..cda371918 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5806,66 +5806,66 @@ __metadata: languageName: node linkType: hard -"@sentry/cli-darwin@npm:2.36.6": - version: 2.36.6 - resolution: "@sentry/cli-darwin@npm:2.36.6" +"@sentry/cli-darwin@npm:2.37.0": + version: 2.37.0 + resolution: "@sentry/cli-darwin@npm:2.37.0" conditions: os=darwin languageName: node linkType: hard -"@sentry/cli-linux-arm64@npm:2.36.6": - version: 2.36.6 - resolution: "@sentry/cli-linux-arm64@npm:2.36.6" +"@sentry/cli-linux-arm64@npm:2.37.0": + version: 2.37.0 + resolution: "@sentry/cli-linux-arm64@npm:2.37.0" conditions: (os=linux | os=freebsd) & cpu=arm64 languageName: node linkType: hard -"@sentry/cli-linux-arm@npm:2.36.6": - version: 2.36.6 - resolution: "@sentry/cli-linux-arm@npm:2.36.6" +"@sentry/cli-linux-arm@npm:2.37.0": + version: 2.37.0 + resolution: "@sentry/cli-linux-arm@npm:2.37.0" conditions: (os=linux | os=freebsd) & cpu=arm languageName: node linkType: hard -"@sentry/cli-linux-i686@npm:2.36.6": - version: 2.36.6 - resolution: "@sentry/cli-linux-i686@npm:2.36.6" +"@sentry/cli-linux-i686@npm:2.37.0": + version: 2.37.0 + resolution: "@sentry/cli-linux-i686@npm:2.37.0" conditions: (os=linux | os=freebsd) & (cpu=x86 | cpu=ia32) languageName: node linkType: hard -"@sentry/cli-linux-x64@npm:2.36.6": - version: 2.36.6 - resolution: "@sentry/cli-linux-x64@npm:2.36.6" +"@sentry/cli-linux-x64@npm:2.37.0": + version: 2.37.0 + resolution: "@sentry/cli-linux-x64@npm:2.37.0" conditions: (os=linux | os=freebsd) & cpu=x64 languageName: node linkType: hard -"@sentry/cli-win32-i686@npm:2.36.6": - version: 2.36.6 - resolution: "@sentry/cli-win32-i686@npm:2.36.6" +"@sentry/cli-win32-i686@npm:2.37.0": + version: 2.37.0 + resolution: "@sentry/cli-win32-i686@npm:2.37.0" conditions: os=win32 & (cpu=x86 | cpu=ia32) languageName: node linkType: hard -"@sentry/cli-win32-x64@npm:2.36.6": - version: 2.36.6 - resolution: "@sentry/cli-win32-x64@npm:2.36.6" +"@sentry/cli-win32-x64@npm:2.37.0": + version: 2.37.0 + resolution: "@sentry/cli-win32-x64@npm:2.37.0" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@sentry/cli@npm:2.36.6": - version: 2.36.6 - resolution: "@sentry/cli@npm:2.36.6" +"@sentry/cli@npm:2.37.0": + version: 2.37.0 + resolution: "@sentry/cli@npm:2.37.0" dependencies: - "@sentry/cli-darwin": 2.36.6 - "@sentry/cli-linux-arm": 2.36.6 - "@sentry/cli-linux-arm64": 2.36.6 - "@sentry/cli-linux-i686": 2.36.6 - "@sentry/cli-linux-x64": 2.36.6 - "@sentry/cli-win32-i686": 2.36.6 - "@sentry/cli-win32-x64": 2.36.6 + "@sentry/cli-darwin": 2.37.0 + "@sentry/cli-linux-arm": 2.37.0 + "@sentry/cli-linux-arm64": 2.37.0 + "@sentry/cli-linux-i686": 2.37.0 + "@sentry/cli-linux-x64": 2.37.0 + "@sentry/cli-win32-i686": 2.37.0 + "@sentry/cli-win32-x64": 2.37.0 https-proxy-agent: ^5.0.0 node-fetch: ^2.6.7 progress: ^2.0.3 @@ -5888,7 +5888,7 @@ __metadata: optional: true bin: sentry-cli: bin/sentry-cli - checksum: d1848fab01be38233f72603ee363bbff808d2c39b4bd59ae418d8a8c8bbce0ad0ced5e7cd3146aa5c74aa79ed1a914bb5dec384aaf94b1f944d363c6c35e4675 + checksum: 92e88688b5148e5abed2cc253290008da89029c5816d7f1bdb5fbed035305c0bcfb5f49e4976ff8ced5fbb876d28e655eef838d32c7a388d3582654ff67d65e0 languageName: node linkType: hard @@ -5965,7 +5965,7 @@ __metadata: "@sentry-internal/typescript": 8.33.1 "@sentry/babel-plugin-component-annotate": 2.20.1 "@sentry/browser": 8.33.1 - "@sentry/cli": 2.36.6 + "@sentry/cli": 2.37.0 "@sentry/core": 8.33.1 "@sentry/react": 8.33.1 "@sentry/types": 8.33.1 @@ -23284,7 +23284,7 @@ __metadata: version: 0.0.0-use.local resolution: "sentry-react-native@workspace:." dependencies: - "@sentry/cli": 2.36.6 + "@sentry/cli": 2.37.0 downlevel-dts: ^0.11.0 lerna: ^8.1.8 npm-run-all2: ^6.2.2