From be6c6dbf1008ae5d656065c2236a7cc9200215ba Mon Sep 17 00:00:00 2001 From: oncecrossover Date: Mon, 4 Mar 2019 12:21:15 +0800 Subject: [PATCH] Use parent project buildVerson in build.gradle --- android/build.gradle | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 0b9bdd3..dbdabb5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,13 +1,16 @@ - apply plugin: 'com.android.library' +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" + compileSdkVersion safeExtGet('compileSdkVersion', 27) + buildToolsVersion safeExtGet('buildToolsVersion', '27.0.3') defaultConfig { - minSdkVersion 16 - targetSdkVersion 22 + minSdkVersion safeExtGet('minSdkVersion', 16) + targetSdkVersion safeExtGet('targetSdkVersion', 27) versionCode 1 versionName "1.0" ndk { @@ -20,6 +23,6 @@ android { } dependencies { - compile 'com.facebook.react:react-native:+' + implementation 'com.facebook.react:react-native:+' }