@@ -79,19 +79,19 @@ describe("gatherConfig()", () => {
7979 "" ,
8080 "allprojects {" ,
8181 " repositories {" ,
82- " maven {" ,
83- " // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm" ,
84- " url({" ,
85- " def searchDir = rootDir.toPath()" ,
86- " do {" ,
87- ' def p = searchDir.resolve("node_modules/react-native/android")' ,
88- " if (p.toFile().exists()) {" ,
89- " return p.toRealPath().toString()" ,
82+ " {" ,
83+ " def searchDir = rootDir.toPath()" ,
84+ " do {" ,
85+ ' def p = searchDir.resolve("node_modules/react-native/android")' ,
86+ " if (p.toFile().exists()) {" ,
87+ " maven {" ,
88+ " url(p.toRealPath().toString())" ,
9089 " }" ,
91- " } while (searchDir = searchDir.getParent())" ,
92- ' throw new GradleException("Could not find `react-native`");' ,
93- " }())" ,
94- " }" ,
90+ " break" ,
91+ " }" ,
92+ " } while (searchDir = searchDir.getParent())" ,
93+ " // As of 0.80, React Native is no longer installed from npm" ,
94+ " }()" ,
9595 " mavenCentral()" ,
9696 " google()" ,
9797 " }" ,
@@ -427,19 +427,19 @@ describe("gatherConfig()", () => {
427427 "" ,
428428 "allprojects {" ,
429429 " repositories {" ,
430- " maven {" ,
431- " // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm" ,
432- " url({" ,
433- " def searchDir = rootDir.toPath()" ,
434- " do {" ,
435- ' def p = searchDir.resolve("node_modules/react-native/android")' ,
436- " if (p.toFile().exists()) {" ,
437- " return p.toRealPath().toString()" ,
430+ " {" ,
431+ " def searchDir = rootDir.toPath()" ,
432+ " do {" ,
433+ ' def p = searchDir.resolve("node_modules/react-native/android")' ,
434+ " if (p.toFile().exists()) {" ,
435+ " maven {" ,
436+ " url(p.toRealPath().toString())" ,
438437 " }" ,
439- " } while (searchDir = searchDir.getParent())" ,
440- ' throw new GradleException("Could not find `react-native`");' ,
441- " }())" ,
442- " }" ,
438+ " break" ,
439+ " }" ,
440+ " } while (searchDir = searchDir.getParent())" ,
441+ " // As of 0.80, React Native is no longer installed from npm" ,
442+ " }()" ,
443443 " mavenCentral()" ,
444444 " google()" ,
445445 " }" ,
0 commit comments