[3.2.0][应用升级] 优化打包后是否支持增量升级开关; 解决release打包失败问题

This commit is contained in:
renwj
2023-05-18 11:45:45 +08:00
parent f34cc4e88b
commit 9c1c8e4da5
2 changed files with 13 additions and 11 deletions

View File

@@ -75,9 +75,10 @@ rootProject.gradle.taskGraph.whenReady { TaskExecutionGraph graph ->
}
if (app != null) {
def android = (AppExtension) app.extensions.findByName("android")
android.defaultConfig.buildConfigField("boolean", "IS_SUPPORT_PATCH_UPGRADE", rootProject.hasProperty("PATCH_UPGRADE_SUPPORT") ? rootProject.properties["PATCH_UPGRADE_SUPPORT"] : false)
def isReleaseOnlineBuild = isOnlineReleaseBuild(gradle)
android.defaultConfig.buildConfigField("boolean", "IS_SUPPORT_PATCH_UPGRADE", isReleaseOnlineBuild && rootProject.hasProperty("PATCH_UPGRADE_SUPPORT") ? rootProject.properties["PATCH_UPGRADE_SUPPORT"] : "false")
def signConfig = android.signingConfigs.getByName("release")
if (signConfig != null && isOnlineReleaseBuild(gradle)) {
if (signConfig != null && isReleaseOnlineBuild) {
if (tasks != null) {
tasks.forEach { t1 ->
t1.doLast { t2 ->