mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-29 04:45:19 +08:00
Support project-wide properties, replace deprecated configuration (#41)
This commit is contained in:
committed by
Krzysztof Magiera
parent
a2046da40d
commit
68424adc39
@@ -14,13 +14,17 @@ buildscript {
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
|
def safeExtGet(prop, fallback) {
|
||||||
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 26
|
compileSdkVersion safeExtGet('compileSdkVersion', 26)
|
||||||
buildToolsVersion "26.0.3"
|
buildToolsVersion safeExtGet('buildToolsVersion', '26.0.3')
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion safeExtGet('minSdkVersion', 16)
|
||||||
targetSdkVersion 22
|
targetSdkVersion safeExtGet('targetSdkVersion', 22)
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
}
|
}
|
||||||
@@ -40,8 +44,8 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.facebook.react:react-native:+'
|
implementation 'com.facebook.react:react-native:+'
|
||||||
compile 'com.android.support:appcompat-v7:26.+'
|
implementation "com.android.support:appcompat-v7:${safeExtGet('supportLibVersion', '26.+')}"
|
||||||
}
|
}
|
||||||
|
|
||||||
def configureReactNativePom(def pom) {
|
def configureReactNativePom(def pom) {
|
||||||
|
|||||||
Reference in New Issue
Block a user