From 461c150f1fcfd554291d693184c0e445fac6c0e3 Mon Sep 17 00:00:00 2001 From: Lucas Vieira Date: Tue, 11 Dec 2018 15:45:59 -0200 Subject: [PATCH] Try to resolve sdk versions from the project before defaulting --- android/build.gradle | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 1adb927..fbaae1e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,16 @@ apply plugin: 'com.android.library' +def DEFAULT_COMPILE_SDK_VERSION = 23 +def DEFAULT_BUILD_TOOLS_VERSION = "23.0.1" +def DEFAULT_TARGET_SDK_VERSION = 22 + android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" + compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION + buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION defaultConfig { minSdkVersion 16 - targetSdkVersion 22 + targetSdkVersion project.hasProperty('targetSdkVersion') ? project.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION versionCode 1 versionName "1.0"