From 41515e78f1e0fc679a06bfaadfcc2d4ec83db475 Mon Sep 17 00:00:00 2001 From: shubham Date: Sat, 8 Dec 2018 22:03:10 +0530 Subject: [PATCH] build.gradle updated --- android/build.gradle | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index beafef4f..1383db5e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,16 @@ +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + 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" ndk { @@ -16,6 +20,6 @@ android { } dependencies { - compile 'com.android.support:appcompat-v7:23.0.0' - compile 'com.facebook.react:react-native:0.19.+' + implementation "com.android.support:appcompat-v7:${safeExtGet('supportLibVersion', '23.0.0')}" + implementation "com.facebook.react:react-native:+" } \ No newline at end of file