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