forked from ibitcy/react-native-hole-view
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
57 lines (46 loc) · 1.67 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
buildscript {
def kotlin_version = rootProject.ext.has('RNHV_kotlinVersion') ? rootProject.ext.get('RNHV_kotlinVersion') : project.properties['RNHV_kotlinVersion']
def gradle_version = rootProject.ext.has('RNHV_gradleVersion') ? rootProject.ext.get('RNHV_gradleVersion') : project.properties['RNHV_gradleVersion']
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:$gradle_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
}
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
android {
compileSdkVersion safeExtGet('compileSdkVersion', 30)
buildToolsVersion safeExtGet('buildToolsVersion', '31.0.0')
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 23)
targetSdkVersion safeExtGet('targetSdkVersion', 30)
versionCode 1
versionName "1.0.0"
}
lintOptions {
abortOnError false
}
}
repositories {
google()
jcenter()
mavenCentral()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../../../node_modules/react-native/android"
}
}
def kotlin_version = safeExtGet('kotlinVersion', project.properties['RNHV_kotlinVersion'])
dependencies {
implementation 'com.facebook.react:react-native:+'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}