-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathbuild.gradle
More file actions
59 lines (48 loc) · 1.35 KB
/
build.gradle
File metadata and controls
59 lines (48 loc) · 1.35 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import groovy.json.JsonSlurper
def getPackageVersion() {
return new JsonSlurper().parse(file('../package.json'), 'utf-8').version
}
def safeExtGet(prop, fallback) {
return rootProject.ext.hasProperty(prop) ? rootProject.ext.get(prop) : fallback
}
def _buildToolsVersion = safeExtGet('buildToolsVersion', '28.0.3')
def _compileSdkVersion = safeExtGet('compileSdkVersion', 28)
def _targetSdkVersion = safeExtGet('targetSdkVersion', 28)
def _minSdkVersion = safeExtGet('minSdkVersion', 16)
buildscript {
repositories {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion _compileSdkVersion
buildToolsVersion _buildToolsVersion
defaultConfig {
minSdkVersion _minSdkVersion
targetSdkVersion _targetSdkVersion
versionCode 4
versionName getPackageVersion()
}
lintOptions {
abortOnError false
}
}
repositories {
mavenLocal()
google()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
dependencies {
implementation 'com.facebook.react:react-native:+'
}
task customClean(type: Delete) {
delete rootProject.buildDir
}
clean.dependsOn customClean