diff --git a/android/build.gradle b/android/build.gradle index b8b997d..40f456e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -25,12 +25,17 @@ def getExtOrIntegerDefault(name) { return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['FeedbackReporter_' + name]).toInteger() } +// Simple helper that allows the root project to override versions declared by this library +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + android { - compileSdkVersion getExtOrIntegerDefault('compileSdkVersion') - buildToolsVersion getExtOrDefault('buildToolsVersion') + compileSdkVersion safeExtGet("compileSdkVersion", 29) + defaultConfig { - minSdkVersion 16 - targetSdkVersion getExtOrIntegerDefault('targetSdkVersion') + minSdkVersion safeExtGet("minSdkVersion", 17) + targetSdkVersion safeExtGet("targetSdkVersion", 29) versionCode 1 versionName "1.0"