-
-
Notifications
You must be signed in to change notification settings - Fork 638
/
build.gradle
85 lines (75 loc) · 2.87 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = '1.3.50'
// The oldest Android version we support. Increasing this stops updates
// for users on old devices, but can simplify the system. Synced with
// our dev docs: docs/developer-guide.md
minSdkVersion = 21
// A bit subtle: we should try to keep this at the latest version,
// but some testing is required and code changes are often required.
// See upstream for background and more discussion:
// https://medium.com/androiddevelopers/picking-your-compilesdkversion-minsdkversion-targetsdkversion-a098a0341ebd
targetSdkVersion = 28
// Should be the latest SDK version available. See upstream recommendation:
// https://medium.com/androiddevelopers/picking-your-compilesdkversion-minsdkversion-targetsdkversion-a098a0341ebd
// What's the latest? Consult this list:
// https://developer.android.com/studio/releases/platforms
// Do edit .travis.yml when updating this.
compileSdkVersion = 29
}
repositories {
google()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.android.tools.build:gradle:3.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
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' }
}
}
project(":react-native-device-info").beforeEvaluate {
ext.googlePlayServicesVersion = "16.1.0"
}
subprojects {
afterEvaluate {
if (project.hasProperty("android")) {
android.compileSdkVersion rootProject.ext.compileSdkVersion
}
}
}
// Force all our third-party dependencies to a sensible buildToolsVersion.
// What version should that be? It's whatever the Android plugin applied
// to our app project.
project(":app").afterEvaluate {
ext.buildToolsVersion = it.android.buildToolsVersion
}
subprojects {
if (path != ":app") {
// This line is tricky -- it causes :app to be (sort of?) evaluated,
// so the `project(":app").afterEvaluate` must come first.
evaluationDependsOn(":app")
afterEvaluate {
if (project.hasProperty("android")) {
android.buildToolsVersion rootProject.ext.buildToolsVersion
}
}
}
}