From fbd18189085de38d24938796260a3b2009714bd3 Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Mon, 15 May 2023 14:58:44 +0800 Subject: [PATCH] =?UTF-8?q?[3.2.0][Opt]=E6=89=93=E5=BC=80matrix=E6=8F=92?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 9 +++++++++ gradle/bytex/bytex.gradle | 1 + gradle/bytex/bytex_matrix.gradle | 13 +++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 gradle/bytex/bytex_matrix.gradle diff --git a/build.gradle b/build.gradle index b1d76c9bc8..c4e616ce7b 100644 --- a/build.gradle +++ b/build.gradle @@ -146,3 +146,12 @@ boolean isAndroidTestBuild() { } return false } + +boolean isReleaseBuild() { + for (String s : gradle.startParameter.taskNames) { + if (s.contains("Release") | s.contains("release")) { + return true + } + } + return false +} diff --git a/gradle/bytex/bytex.gradle b/gradle/bytex/bytex.gradle index 7a043453bc..cb27905070 100644 --- a/gradle/bytex/bytex.gradle +++ b/gradle/bytex/bytex.gradle @@ -14,3 +14,4 @@ apply from: rootProject.file('gradle/bytex/bytex_thread_opt.gradle') apply from: rootProject.file('gradle/bytex/bytex_lancetx.gradle') apply from: rootProject.file('gradle/bytex/bytex_apm.gradle') apply from: rootProject.file('gradle/bytex/bytex_systrace.gradle') +apply from: rootProject.file('gradle/bytex/bytex_matrix.gradle') diff --git a/gradle/bytex/bytex_matrix.gradle b/gradle/bytex/bytex_matrix.gradle new file mode 100644 index 0000000000..3ed5443090 --- /dev/null +++ b/gradle/bytex/bytex_matrix.gradle @@ -0,0 +1,13 @@ +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" + } +} +