chore: Refactor Gradle variables.

This commit is contained in:
Dylan Vann 2019-10-20 16:01:55 -04:00
parent 70d3a382ee
commit 227d6e4e94
1 changed files with 9 additions and 5 deletions

View File

@ -14,18 +14,22 @@ def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
def _reactNativeVersion = safeExtGet("reactNative", "+")
def _excludeAppGlideModule = safeExtGet("excludeAppGlideModule", false)
def _buildToolsVersion = safeExtGet("buildToolsVersion", "28.0.3")
def _compileSdkVersion = safeExtGet("compileSdkVersion", 28)
def _glideVersion = safeExtGet("glideVersion", "4.9.0")
def _minSdkVersion = safeExtGet("minSdkVersion", 16)
def _reactNativeVersion = safeExtGet("reactNative", "+")
def _targetSdkVersion = safeExtGet("targetSdkVersion", 28)
android {
compileSdkVersion _compileSdkVersion
buildToolsVersion safeExtGet("buildToolsVersion", "28.0.3")
buildToolsVersion _buildToolsVersion
sourceSets {
main {
java {
if (safeExtGet("excludeAppGlideModule", false)) {
if (_excludeAppGlideModule) {
srcDir "src"
exclude "**/FastImageGlideModule.java"
}
@ -34,8 +38,8 @@ android {
}
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 16)
targetSdkVersion safeExtGet("targetSdkVersion", 28)
minSdkVersion _minSdkVersion
targetSdkVersion _targetSdkVersion
versionCode 1
versionName "1.0"
}