diff --git a/build-apk.sh b/build-apk.sh index f5256bb..bc92ee7 100755 --- a/build-apk.sh +++ b/build-apk.sh @@ -93,6 +93,16 @@ if [ -f "$REANIMATED_CMAKE" ] && ! grep -q "max-page-size" "$REANIMATED_CMAKE"; info "Patched react-native-reanimated for 16KB pages" fi +# ─── 4.6. Disable New Architecture (Android 15 compat) ──────────────────── +GRADLE_PROPS_NEWARCH="$SCRIPT_DIR/android/gradle.properties" +if [ -f "$GRADLE_PROPS_NEWARCH" ]; then + sed -i 's/^newArchEnabled=true/newArchEnabled=false/' "$GRADLE_PROPS_NEWARCH" + if ! grep -q "^newArchEnabled=" "$GRADLE_PROPS_NEWARCH"; then + echo "newArchEnabled=false" >> "$GRADLE_PROPS_NEWARCH" + fi + info "New Architecture disabled in gradle.properties" +fi + # ─── 5. Patch build.gradle — inject release signingConfig ────────────────── info "Patching android/app/build.gradle for release signing…" diff --git a/react-native.config.js b/react-native.config.js new file mode 100644 index 0000000..7d5d44e --- /dev/null +++ b/react-native.config.js @@ -0,0 +1,13 @@ +// Exclude native build for packages not used in this project. +// react-native-gesture-handler detects their absence and falls back to its +// noreanimated codepath, so GestureHandlerRootView continues to work. +module.exports = { + dependencies: { + 'react-native-reanimated': { + platforms: { android: null }, + }, + 'react-native-worklets': { + platforms: { android: null }, + }, + }, +};