/
build.gradle
58 lines (48 loc) · 1.33 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
import groovy.json.JsonSlurper
def computeVersionName() {
// dynamically retrieve version from package.json
def slurper = new JsonSlurper()
def json = slurper.parse(file('../package.json'), "utf-8")
return json.version
}
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
}
apply plugin: 'com.android.library'
def DEFAULT_COMPILE_SDK_VERSION = 27
def DEFAULT_BUILD_TOOLS_VERSION = "27.0.3"
def DEFAULT_TARGET_SDK_VERSION = 26
android {
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
defaultConfig {
minSdkVersion 16
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
versionCode 1
versionName computeVersionName()
}
lintOptions {
abortOnError false
}
}
repositories {
mavenCentral()
google()
jcenter()
maven {
url "$rootDir/../../react-native/android"
}
}
dependencies {
implementation "com.facebook.react:react-native:+" // From node_modules
api project(':mobile')
}
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionUrl = distributionUrl.replace("bin", "all")
}