-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
build.gradle
62 lines (52 loc) · 1.86 KB
/
build.gradle
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import groovy.json.JsonSlurper
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 28
// Some dependencies still expect supportLibVersion to be defined
supportLibVersion = "28.0.0"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
// Copied version from the Exponent Android project.
// Newer versions suffer either from "play-services-basement was supposed to be 15.0.1,
// but has been resolved to 17.0.0"
// or https://github.com/segment-integrations/analytics-android-integration-firebase/issues/23
classpath 'com.google.gms:google-services:3.2.1' // Google Services plugin
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
def packageJsonFile = new File(rootProject.projectDir, '../package.json')
def packageJson = new JsonSlurper().parseText(packageJsonFile.text)
// [Custom]
ext {
reactNativeVersion = packageJson.dependencies["react-native"]
}
allprojects {
// [Custom]
configurations.all {
resolutionStrategy.force "com.facebook.react:react-native:${reactNativeVersion}"
}
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
// Android JSC is installed from npm
url("$rootDir/../../../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}