-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathbuild.gradle
More file actions
43 lines (40 loc) · 1.16 KB
/
build.gradle
File metadata and controls
43 lines (40 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
buildscript {
apply(from: {
def searchDir = rootDir.toPath()
do {
def p = searchDir.resolve("node_modules/react-native-test-app/android/dependencies.gradle")
if (p.toFile().exists()) {
return p.toRealPath().toString()
}
} while (searchDir = searchDir.getParent())
throw new GradleException("Could not find `react-native-test-app`");
}())
repositories {
mavenCentral()
google()
}
dependencies {
getReactNativeDependencies().each { dependency ->
classpath(dependency)
}
}
}
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()
}
break
}
} while (searchDir = searchDir.getParent())
// As of 0.80, React Native is no longer installed from npm
}()
mavenCentral()
google()
}
}