From a82f933d6cf04688df446767016dedd04ad481ff Mon Sep 17 00:00:00 2001 From: Austin Bonander Date: Wed, 6 Mar 2019 19:56:52 -0800 Subject: [PATCH] read project vars for `compileSdkVersion`, `buildToolsVersion`, `targetSdkVersion` --- android/build.gradle | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 3faae89..7efa8bb 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -11,13 +11,17 @@ buildscript { apply plugin: 'com.android.library' +def projectVar(name, fallback) { + return project.findProperty(name) ?: fallback +} + android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" + compileSdkVersion projectVar('compileSdkVersion', 23) + buildToolsVersion projectVar('buildToolsVersion', '23.0.1') defaultConfig { minSdkVersion 16 - targetSdkVersion 22 + targetSdkVersion projectVar('targetSdkVersion', 22) versionCode 1 versionName "1.0" }