[3.2.0][Opt]打开matrix插件

This commit is contained in:
chenfufeng
2023-05-15 14:58:44 +08:00
parent fac0757836
commit fbd1818908
3 changed files with 23 additions and 0 deletions

View File

@@ -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
}

View File

@@ -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')

View File

@@ -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"
}
}