chore: Refactor Gradle variables.
This commit is contained in:
parent
70d3a382ee
commit
227d6e4e94
|
@ -14,18 +14,22 @@ def safeExtGet(prop, fallback) {
|
||||||
rootProject.ext.has(prop) ? rootProject.ext.get(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 _compileSdkVersion = safeExtGet("compileSdkVersion", 28)
|
||||||
def _glideVersion = safeExtGet("glideVersion", "4.9.0")
|
def _glideVersion = safeExtGet("glideVersion", "4.9.0")
|
||||||
|
def _minSdkVersion = safeExtGet("minSdkVersion", 16)
|
||||||
|
def _reactNativeVersion = safeExtGet("reactNative", "+")
|
||||||
|
def _targetSdkVersion = safeExtGet("targetSdkVersion", 28)
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion _compileSdkVersion
|
compileSdkVersion _compileSdkVersion
|
||||||
buildToolsVersion safeExtGet("buildToolsVersion", "28.0.3")
|
buildToolsVersion _buildToolsVersion
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
java {
|
java {
|
||||||
if (safeExtGet("excludeAppGlideModule", false)) {
|
if (_excludeAppGlideModule) {
|
||||||
srcDir "src"
|
srcDir "src"
|
||||||
exclude "**/FastImageGlideModule.java"
|
exclude "**/FastImageGlideModule.java"
|
||||||
}
|
}
|
||||||
|
@ -34,8 +38,8 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion safeExtGet("minSdkVersion", 16)
|
minSdkVersion _minSdkVersion
|
||||||
targetSdkVersion safeExtGet("targetSdkVersion", 28)
|
targetSdkVersion _targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue