From 70b46fa94bb42fe27c2a23eaa3b82f0fcdd715a3 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Wed, 19 Jun 2019 04:48:21 -0500 Subject: [PATCH] fix: use react-native convention for version overrides, allows AndroidX to work --- android/build.gradle | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 43fcb3a16..4080ce21c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,13 +2,17 @@ apply plugin: 'com.android.library' repositories { mavenCentral() } +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + android { - compileSdkVersion 26 - buildToolsVersion "26.0.3" + compileSdkVersion safeExtGet('compileSdkVersion', 28) + defaultConfig { - minSdkVersion 16 - targetSdkVersion 26 + minSdkVersion safeExtGet('minSdkVersion', 16) + targetSdkVersion safeExtGet('targetSdkVersion', 28) versionCode 1 versionName "1.0" }