From fbb427502e5cc18d1d8edeb0086df892d336164f Mon Sep 17 00:00:00 2001 From: rmevans9 Date: Tue, 26 Mar 2019 13:50:39 -0400 Subject: [PATCH] Make this work with RN 56 (#283) * Make this work with RN 56 * Don't forget to checkin the method too... --- android/build.gradle | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 5fbca77..1c192f5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,3 +1,7 @@ +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + buildscript { repositories { jcenter() @@ -11,12 +15,12 @@ buildscript { apply plugin: 'com.android.library' android { - compileSdkVersion 25 - buildToolsVersion "25.0.3" + compileSdkVersion safeExtGet('compileSdkVersion', 25) + buildToolsVersion safeExtGet('buildToolsVersion', '25.0.3') defaultConfig { - minSdkVersion 16 - targetSdkVersion 22 + minSdkVersion safeExtGet('minSdkVersion', 16) + targetSdkVersion safeExtGet('targetSdkVersion', 22) versionCode 1 versionName "1.0"