Skip to content

Commit e47253d

Browse files
authored
Merge branch 'v8' into antonis/cocoa-9.1.1
2 parents 1d0635f + 5bfe51c commit e47253d

5 files changed

Lines changed: 53 additions & 47 deletions

File tree

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
"performance-tests/*"
99
],
1010
"npmClient": "yarn"
11-
}
11+
}

samples/react-native/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"build-android-release-legacy": "scripts/build-android-release-legacy.sh",
1111
"build-android-debug": "scripts/build-android-debug.sh",
1212
"build-android-debug-legacy": "scripts/build-android-debug-legacy.sh",
13-
"build-android-debug-auto": "scripts/build-android-debug-auto.sh",
14-
"build-android-debug-manual": "scripts/build-android-debug-manual.sh",
13+
"build-android-debug-auto": "SENTRY_DISABLE_NATIVE_START=true scripts/build-android-debug-init.sh",
14+
"build-android-debug-manual": "SENTRY_DISABLE_NATIVE_START=false scripts/build-android-debug-init.sh",
1515
"build-ios-release": "scripts/build-ios-release.sh",
1616
"build-ios-debug": "scripts/build-ios-debug.sh",
1717
"test": "jest",

samples/react-native/scripts/build-android-debug-auto.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
3+
# Exit on error
4+
set -e
5+
6+
thisFilePath=$(dirname "$0")
7+
8+
# Validate SENTRY_DISABLE_NATIVE_START is set
9+
if [ -z "${SENTRY_DISABLE_NATIVE_START}" ]; then
10+
echo "Error: SENTRY_DISABLE_NATIVE_START environment variable is not set."
11+
echo "Usage: SENTRY_DISABLE_NATIVE_START=true|false $0"
12+
echo ""
13+
echo " true - Build for auto init from JS (native SDK disabled)"
14+
echo " false - Build for manual native init (native SDK enabled)"
15+
exit 1
16+
fi
17+
18+
# Export so Gradle daemon can access it
19+
export SENTRY_DISABLE_NATIVE_START
20+
21+
# Map SENTRY_DISABLE_NATIVE_START to build mode
22+
if [ "${SENTRY_DISABLE_NATIVE_START}" = "true" ]; then
23+
BUILD_MODE="auto"
24+
INIT_DESCRIPTION="initialize Sentry from JavaScript (auto init)"
25+
elif [ "${SENTRY_DISABLE_NATIVE_START}" = "false" ]; then
26+
BUILD_MODE="manual"
27+
INIT_DESCRIPTION="initialize Sentry natively before JS (manual init)"
28+
else
29+
echo "Error: Invalid value for SENTRY_DISABLE_NATIVE_START: '${SENTRY_DISABLE_NATIVE_START}'"
30+
echo "Expected 'true' or 'false'"
31+
exit 1
32+
fi
33+
34+
export RN_ARCHITECTURE="new"
35+
export CONFIG="debug"
36+
37+
echo "Building Android with SENTRY_DISABLE_NATIVE_START=${SENTRY_DISABLE_NATIVE_START}"
38+
echo "This build will ${INIT_DESCRIPTION}"
39+
40+
"${thisFilePath}/build-android.sh"
41+
42+
# Rename the output APK based on build mode
43+
cd "${thisFilePath}/.."
44+
if [ -f "app.apk" ]; then
45+
mv app.apk "app-${BUILD_MODE}.apk"
46+
echo "Build complete: app-${BUILD_MODE}.apk"
47+
else
48+
echo "Error: Expected output file 'app.apk' not found"
49+
exit 1
50+
fi

samples/react-native/scripts/build-android-debug-manual.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)