From 91d08f97997091046e736d755e1a60c61a8d6639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Roma=C5=84czyk?= Date: Wed, 2 Jul 2025 17:38:21 +0200 Subject: [PATCH] Revert "chore: align build.gradle in testers (#1200)" This reverts commit 8224833dd2a432bd4bef5cee8a8b4a004ba4106d. --- apps/tester-app/android/build.gradle | 24 +++++++++---------- .../tester-federation-v2/android/build.gradle | 24 +++++++++---------- apps/tester-federation/android/build.gradle | 24 +++++++++---------- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/apps/tester-app/android/build.gradle b/apps/tester-app/android/build.gradle index 6b403e9d7..d8bcc3aeb 100644 --- a/apps/tester-app/android/build.gradle +++ b/apps/tester-app/android/build.gradle @@ -24,19 +24,19 @@ buildscript { allprojects { repositories { - { - def searchDir = rootDir.toPath() - do { - def p = searchDir.resolve("node_modules/react-native/android") - if (p.toFile().exists()) { - maven { - url(p.toRealPath().toString()) + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url({ + def searchDir = rootDir.toPath() + do { + def p = searchDir.resolve("node_modules/react-native/android") + if (p.toFile().exists()) { + return p.toRealPath().toString() } - break - } - } while (searchDir = searchDir.getParent()) - // As of 0.80, React Native is no longer installed from npm - }() + } while (searchDir = searchDir.getParent()) + throw new GradleException("Could not find `react-native`"); + }()) + } mavenCentral() google() } diff --git a/apps/tester-federation-v2/android/build.gradle b/apps/tester-federation-v2/android/build.gradle index 6b403e9d7..d8bcc3aeb 100644 --- a/apps/tester-federation-v2/android/build.gradle +++ b/apps/tester-federation-v2/android/build.gradle @@ -24,19 +24,19 @@ buildscript { allprojects { repositories { - { - def searchDir = rootDir.toPath() - do { - def p = searchDir.resolve("node_modules/react-native/android") - if (p.toFile().exists()) { - maven { - url(p.toRealPath().toString()) + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url({ + def searchDir = rootDir.toPath() + do { + def p = searchDir.resolve("node_modules/react-native/android") + if (p.toFile().exists()) { + return p.toRealPath().toString() } - break - } - } while (searchDir = searchDir.getParent()) - // As of 0.80, React Native is no longer installed from npm - }() + } while (searchDir = searchDir.getParent()) + throw new GradleException("Could not find `react-native`"); + }()) + } mavenCentral() google() } diff --git a/apps/tester-federation/android/build.gradle b/apps/tester-federation/android/build.gradle index 6b403e9d7..d8bcc3aeb 100644 --- a/apps/tester-federation/android/build.gradle +++ b/apps/tester-federation/android/build.gradle @@ -24,19 +24,19 @@ buildscript { allprojects { repositories { - { - def searchDir = rootDir.toPath() - do { - def p = searchDir.resolve("node_modules/react-native/android") - if (p.toFile().exists()) { - maven { - url(p.toRealPath().toString()) + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url({ + def searchDir = rootDir.toPath() + do { + def p = searchDir.resolve("node_modules/react-native/android") + if (p.toFile().exists()) { + return p.toRealPath().toString() } - break - } - } while (searchDir = searchDir.getParent()) - // As of 0.80, React Native is no longer installed from npm - }() + } while (searchDir = searchDir.getParent()) + throw new GradleException("Could not find `react-native`"); + }()) + } mavenCentral() google() }