Skip to content

Commit 11d9091

Browse files
authored
Revert "chore: align build.gradle in testers" (#1202)
1 parent 47ba01e commit 11d9091

3 files changed

Lines changed: 36 additions & 36 deletions

File tree

apps/tester-app/android/build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ buildscript {
2424

2525
allprojects {
2626
repositories {
27-
{
28-
def searchDir = rootDir.toPath()
29-
do {
30-
def p = searchDir.resolve("node_modules/react-native/android")
31-
if (p.toFile().exists()) {
32-
maven {
33-
url(p.toRealPath().toString())
27+
maven {
28+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
29+
url({
30+
def searchDir = rootDir.toPath()
31+
do {
32+
def p = searchDir.resolve("node_modules/react-native/android")
33+
if (p.toFile().exists()) {
34+
return p.toRealPath().toString()
3435
}
35-
break
36-
}
37-
} while (searchDir = searchDir.getParent())
38-
// As of 0.80, React Native is no longer installed from npm
39-
}()
36+
} while (searchDir = searchDir.getParent())
37+
throw new GradleException("Could not find `react-native`");
38+
}())
39+
}
4040
mavenCentral()
4141
google()
4242
}

apps/tester-federation-v2/android/build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ buildscript {
2424

2525
allprojects {
2626
repositories {
27-
{
28-
def searchDir = rootDir.toPath()
29-
do {
30-
def p = searchDir.resolve("node_modules/react-native/android")
31-
if (p.toFile().exists()) {
32-
maven {
33-
url(p.toRealPath().toString())
27+
maven {
28+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
29+
url({
30+
def searchDir = rootDir.toPath()
31+
do {
32+
def p = searchDir.resolve("node_modules/react-native/android")
33+
if (p.toFile().exists()) {
34+
return p.toRealPath().toString()
3435
}
35-
break
36-
}
37-
} while (searchDir = searchDir.getParent())
38-
// As of 0.80, React Native is no longer installed from npm
39-
}()
36+
} while (searchDir = searchDir.getParent())
37+
throw new GradleException("Could not find `react-native`");
38+
}())
39+
}
4040
mavenCentral()
4141
google()
4242
}

apps/tester-federation/android/build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ buildscript {
2424

2525
allprojects {
2626
repositories {
27-
{
28-
def searchDir = rootDir.toPath()
29-
do {
30-
def p = searchDir.resolve("node_modules/react-native/android")
31-
if (p.toFile().exists()) {
32-
maven {
33-
url(p.toRealPath().toString())
27+
maven {
28+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
29+
url({
30+
def searchDir = rootDir.toPath()
31+
do {
32+
def p = searchDir.resolve("node_modules/react-native/android")
33+
if (p.toFile().exists()) {
34+
return p.toRealPath().toString()
3435
}
35-
break
36-
}
37-
} while (searchDir = searchDir.getParent())
38-
// As of 0.80, React Native is no longer installed from npm
39-
}()
36+
} while (searchDir = searchDir.getParent())
37+
throw new GradleException("Could not find `react-native`");
38+
}())
39+
}
4040
mavenCentral()
4141
google()
4242
}

0 commit comments

Comments
 (0)