From 9e3f602c1e4656325dd43bf77e9fcaec585da23a Mon Sep 17 00:00:00 2001 From: iceleaf916 Date: Tue, 9 Jul 2019 18:12:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=8D=93:=20=E9=80=82=E9=85=8D?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E7=9A=84=E7=BC=96=E8=AF=91=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E5=92=8CSDK=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 5720864..9ce6789 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -12,15 +12,21 @@ def computeQQAppId() { def json = slurper.parse(file('../../../package.json'), "utf-8") return json.qq_app_id } + +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + apply plugin: 'com.android.library' android { - compileSdkVersion 23 - buildToolsVersion "25.0.0" + compileSdkVersion safeExtGet('compileSdkVersion', 23) + buildToolsVersion safeExtGet('buildToolsVersion', '25.0.0') defaultConfig { - minSdkVersion 16 - targetSdkVersion 24 + minSdkVersion safeExtGet('minSdkVersion', 16) + targetSdkVersion safeExtGet('targetSdkVersion', 24) + versionCode 1 versionName computeVersionName() manifestPlaceholders = [ @@ -36,6 +42,6 @@ repositories { } dependencies { - compile "com.facebook.react:react-native:+" - compile fileTree(dir: 'libs', include: ['*.jar']) + implementation "com.facebook.react:react-native:+" + implementation fileTree(dir: 'libs', include: ['*.jar']) }