From 0fb4e85da754999e49f75b1368c4ea465c3ba257 Mon Sep 17 00:00:00 2001 From: Uilque Messias Date: Thu, 2 Nov 2017 15:54:18 -0200 Subject: [PATCH] Check for ext property on Android gradle module --- android/build.gradle | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 185656f..31e7abb 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -10,11 +10,13 @@ buildscript { apply plugin: 'com.android.library' -def _reactNativeVersion = rootProject.ext.reactNative ?: '+'; -def _compileSdkVersion = rootProject.ext.compileSdkVersion ?: 26; -def _buildToolsVersion = rootProject.ext.buildToolsVersion ?: '26.0.1'; -def _minSdkVersion = rootProject.ext.minSdkVersion ?: 16; -def _targetSdkVersion = rootProject.ext.targetSdkVersion ?: 26; +def _ext = rootProject.ext; + +def _reactNativeVersion = _ext.has('reactNative') ? _ext.reactNative : '+'; +def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 26; +def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '26.0.1'; +def _minSdkVersion = _ext.has('minSdkVersion') ? _ext.minSdkVersion : 16; +def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 26; android { compileSdkVersion _compileSdkVersion