applying minor build speed improvements
- disabling release build type - only including xxhdpi resources
This commit is contained in:
parent
8261d53460
commit
563fdff73e
|
@ -13,8 +13,18 @@ android {
|
||||||
def versionJson = new groovy.json.JsonSlurper().parseText(rootProject.file('version.json').text)
|
def versionJson = new groovy.json.JsonSlurper().parseText(rootProject.file('version.json').text)
|
||||||
versionCode versionJson.code
|
versionCode versionJson.code
|
||||||
versionName versionJson.name
|
versionName versionJson.name
|
||||||
|
|
||||||
|
if (isDebugBuild) {
|
||||||
|
resConfigs "en", "xxhdpi"
|
||||||
|
variantFilter { variant ->
|
||||||
|
if (variant.buildType.name == "release") {
|
||||||
|
setIgnore(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
resConfigs "en"
|
resConfigs "en"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bundle {
|
bundle {
|
||||||
abi.enableSplit true
|
abi.enableSplit true
|
||||||
|
|
|
@ -18,6 +18,8 @@ def launchTask = getGradle()
|
||||||
.getTaskRequests()
|
.getTaskRequests()
|
||||||
.toString()
|
.toString()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
|
def isReleaseBuild = launchTask.contains("release")
|
||||||
|
ext.isDebugBuild = !isReleaseBuild
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||||
|
@ -116,7 +118,6 @@ ext.applyAndroidLibraryModule = { project ->
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.applyCrashlyticsIfRelease = { project ->
|
ext.applyCrashlyticsIfRelease = { project ->
|
||||||
def isReleaseBuild = launchTask.contains("release")
|
|
||||||
if (isReleaseBuild) {
|
if (isReleaseBuild) {
|
||||||
project.apply plugin: 'com.google.firebase.crashlytics'
|
project.apply plugin: 'com.google.firebase.crashlytics'
|
||||||
project.afterEvaluate {
|
project.afterEvaluate {
|
||||||
|
|
Loading…
Reference in New Issue