From 37e82c85c13bb6b362e16a94e8b44c634ac76f6c Mon Sep 17 00:00:00 2001 From: Yohei Ono Date: Wed, 26 Jun 2019 16:19:26 +0900 Subject: [PATCH] Fix build issue with React Native 0.59 --- android/build.gradle | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 0aabe24..68a0c9a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,8 @@ apply plugin: 'com.android.library' +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} buildscript { repositories { @@ -14,12 +17,12 @@ buildscript { apply plugin: 'com.android.library' android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" + compileSdkVersion safeExtGet('compileSdkVersion', 23) + buildToolsVersion safeExtGet('buildToolsVersion', "23.0.1") defaultConfig { - minSdkVersion 16 - targetSdkVersion 22 + minSdkVersion safeExtGet('minSdkVersion', 16) + targetSdkVersion safeExtGet('targetSdkVersion', 22) versionCode 1 versionName "1.0" } @@ -33,5 +36,5 @@ repositories { } dependencies { - compile 'com.facebook.react:react-native:+' + implementation 'com.facebook.react:react-native:+' }