@@ -79,19 +79,19 @@ describe("gatherConfig()", () => {
79
79
"" ,
80
80
"allprojects {" ,
81
81
" 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())" ,
90
89
" }" ,
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
+ " }()" ,
95
95
" mavenCentral()" ,
96
96
" google()" ,
97
97
" }" ,
@@ -427,19 +427,19 @@ describe("gatherConfig()", () => {
427
427
"" ,
428
428
"allprojects {" ,
429
429
" 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())" ,
438
437
" }" ,
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
+ " }()" ,
443
443
" mavenCentral()" ,
444
444
" google()" ,
445
445
" }" ,
0 commit comments