diff --git a/core/function-impl/mogo-core-function-patch/build.gradle b/core/function-impl/mogo-core-function-patch/build.gradle index 86458d14eb..ba300f0ce0 100644 --- a/core/function-impl/mogo-core-function-patch/build.gradle +++ b/core/function-impl/mogo-core-function-patch/build.gradle @@ -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 -> diff --git a/gradle/bytex/bytex_matrix.gradle b/gradle/bytex/bytex_matrix.gradle index b8bcfef58a..05e07ead89 100644 --- a/gradle/bytex/bytex_matrix.gradle +++ b/gradle/bytex/bytex_matrix.gradle @@ -1,10 +1,11 @@ -apply plugin: 'bytex.matrix' - -matrix { - trace { - enable = true //if you don't want to use trace canary, set false - baseMethodMapFile = "${project.buildDir}/matrix_output/customMethodMapping.txt" - blackListFile = "${project.projectDir}/matrixTrace/blackMethodList.txt" +if (!rootProject.isReleaseBuild()) { + apply plugin: 'bytex.matrix' + matrix { + trace { + enable = true //if you don't want to use trace canary, set false + baseMethodMapFile = "${project.buildDir}/matrix_output/customMethodMapping.txt" + blackListFile = "${project.projectDir}/matrixTrace/blackMethodList.txt" + } + logLevel = "D" } - logLevel = "D" -} \ No newline at end of file +}