-
-
Notifications
You must be signed in to change notification settings - Fork 53
/
build.gradle
executable file
·60 lines (52 loc) · 1.81 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
apply plugin: 'com.android.library'
buildscript {
// The Android Gradle plugin is only required when opening the android folder stand-alone.
// This avoids unnecessary downloads and potential conflicts when the library is included as a
// module dependency in an application project.
if (project == rootProject) {
repositories {
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
// Matches the RN Hello World template
// https://github.com/facebook/react-native/blob/1e8f3b11027fe0a7514b4fc97d0798d3c64bc895/local-cli/templates/HelloWorld/android/build.gradle#L21
url "$projectDir/../node_modules/react-native/android"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.google.gms:google-services:4.3.3'
}
}
}
def safeExtGet(name) {
rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties[name]
}
android {
compileSdkVersion safeExtGet('compileSdkVersion')
buildToolsVersion safeExtGet('buildToolsVersion')
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion')
targetSdkVersion safeExtGet('targetSdkVersion')
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
}
}
lintOptions {
disable 'GradleCompatible'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "com.google.android.play:core:${safeExtGet('playCoreVersion')}"
implementation "com.google.android.gms:play-services-base:${safeExtGet('playServicesVersion')}"
}