From 7fe19f20ee99678f1f509d960ca705fc7c811255 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Sat, 5 Sep 2026 22:13:37 -0700 Subject: [PATCH] fix(mobile): support generated Gradle 9 toolchain builds --- mobile/README.md | 4 ++++ .../@react-native__gradle-plugin@0.83.10.patch | 12 ++++++++++++ mobile/pnpm-lock.yaml | 7 +++++-- mobile/pnpm-workspace.yaml | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 mobile/patches/@react-native__gradle-plugin@0.83.10.patch diff --git a/mobile/README.md b/mobile/README.md index ead9c98569c..cfb9a5364eb 100644 --- a/mobile/README.md +++ b/mobile/README.md @@ -61,6 +61,10 @@ undo fix. After changing the patch, run `pnpm install`, regenerate native projec with `pnpm exec expo prebuild --no-install`, and rebuild the native app; Metro reload alone cannot apply it. +The React Native Gradle plugin is also patched to use Foojay resolver 1.0.0: +the upstream 0.5.0 resolver references an API removed in Expo's generated Gradle 9. +Android builds require Java 17 or later, matching the release workflow. + Android source builds also compile Hermes and C++ dependencies. Set `ANDROID_HOME` or `ANDROID_SDK_ROOT` to your Android SDK directory, even if `local.properties` already specifies it. Install the native build tools for your host (Xcode command diff --git a/mobile/patches/@react-native__gradle-plugin@0.83.10.patch b/mobile/patches/@react-native__gradle-plugin@0.83.10.patch new file mode 100644 index 00000000000..3a33105d60a --- /dev/null +++ b/mobile/patches/@react-native__gradle-plugin@0.83.10.patch @@ -0,0 +1,12 @@ +diff --git a/settings.gradle.kts b/settings.gradle.kts +--- a/settings.gradle.kts ++++ b/settings.gradle.kts +@@ -13,7 +13,7 @@ pluginManagement { + } + } + +-plugins { id("org.gradle.toolchains.foojay-resolver-convention").version("0.5.0") } ++plugins { id("org.gradle.toolchains.foojay-resolver-convention").version("1.0.0") } + + include( + ":react-native-gradle-plugin", diff --git a/mobile/pnpm-lock.yaml b/mobile/pnpm-lock.yaml index 7b4fac103a8..c5ec080d501 100644 --- a/mobile/pnpm-lock.yaml +++ b/mobile/pnpm-lock.yaml @@ -8,6 +8,9 @@ overrides: xcode>uuid: 11.1.1 patchedDependencies: + '@react-native/gradle-plugin@0.83.10': + hash: 8908788fee0d1fe7b33319ae71bf9bf8204fb90bcc116d89fa859d6628de0ffd + path: patches/@react-native__gradle-plugin@0.83.10.patch react-native-webview@13.16.2: hash: de6761dfa76a5491a23e49f1262566a8831cab26736a336fdffc5d4e7d05ff27 path: patches/react-native-webview@13.16.2.patch @@ -10001,7 +10004,7 @@ snapshots: - supports-color - utf-8-validate - '@react-native/gradle-plugin@0.83.10': {} + '@react-native/gradle-plugin@0.83.10(patch_hash=8908788fee0d1fe7b33319ae71bf9bf8204fb90bcc116d89fa859d6628de0ffd)': {} '@react-native/js-polyfills@0.83.10': {} @@ -14690,7 +14693,7 @@ snapshots: '@react-native/assets-registry': 0.83.10 '@react-native/codegen': 0.83.10(@babel/core@7.29.7) '@react-native/community-cli-plugin': 0.83.10(@react-native/metro-config@0.85.2(@babel/core@7.29.7)) - '@react-native/gradle-plugin': 0.83.10 + '@react-native/gradle-plugin': 0.83.10(patch_hash=8908788fee0d1fe7b33319ae71bf9bf8204fb90bcc116d89fa859d6628de0ffd) '@react-native/js-polyfills': 0.83.10 '@react-native/normalize-colors': 0.83.10 '@react-native/virtualized-lists': 0.83.10(@types/react@19.2.14)(react-native@0.83.10(patch_hash=760b72b5ec10efe58ad02e054a7de647bb0b9343a188ebd0358681cc6813ae49)(@babel/core@7.29.7)(@react-native/metro-config@0.85.2(@babel/core@7.29.7))(@types/react@19.2.14)(react@19.2.8))(react@19.2.8) diff --git a/mobile/pnpm-workspace.yaml b/mobile/pnpm-workspace.yaml index 76ac7de7534..f4d01cc23bd 100644 --- a/mobile/pnpm-workspace.yaml +++ b/mobile/pnpm-workspace.yaml @@ -10,5 +10,6 @@ overrides: xcode>uuid: 11.1.1 patchedDependencies: + '@react-native/gradle-plugin@0.83.10': patches/@react-native__gradle-plugin@0.83.10.patch react-native-webview@13.16.2: patches/react-native-webview@13.16.2.patch react-native@0.83.10: patches/react-native@0.83.10.patch