From d07b71bd9ba1f1a9a956e729c5fd6eb293960576 Mon Sep 17 00:00:00 2001 From: David Gruseck Date: Sat, 30 Mar 2019 18:24:07 +0100 Subject: [PATCH] Update build.gradle to support newer sdk versions --- android/build.gradle | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index e148609..ced7c4f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -13,13 +13,17 @@ buildscript { apply plugin: 'com.android.library' +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + android { - compileSdkVersion 27 - buildToolsVersion '28.0.3' + compileSdkVersion safeExtGet("compileSdkVersion", 27) + buildToolsVersion safeExtGet("buildToolsVersion", "28.0.3") defaultConfig { - minSdkVersion 16 - targetSdkVersion 27 + minSdkVersion safeExtGet("minSdkVersion", 16) + targetSdkVersion safeExtGet("targetSdkVersion", 27) versionCode 1 versionName "1.0" }