From 59a9533d37f5da59b518e4158098ea21dd6b5531 Mon Sep 17 00:00:00 2001 From: gucheng Date: Tue, 17 Dec 2019 16:58:28 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20=E6=8F=92=E4=BB=B6andro?= =?UTF-8?q?id=E7=AB=AFcompileSdkVersion=E4=B8=8EbuildToolsVersion=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E9=A1=B9=E7=9B=AE=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 40f4f265c..a9f28f1a5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,8 +1,12 @@ apply plugin: 'com.android.library' +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + android { - compileSdkVersion 27 - buildToolsVersion "23.0.1" + compileSdkVersion safeExtGet('compileSdkVersion', 27) + buildToolsVersion safeExtGet('buildToolsVersion', '23.0.1') defaultConfig { minSdkVersion 16