From 593100a1437bb28e481952e745f18a46ffcc36a5 Mon Sep 17 00:00:00 2001 From: pppscn <35696959@qq.com> Date: Sun, 12 Feb 2023 11:30:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E4=BD=BF=E7=94=A8leakcanary=E6=A3=80=E6=B5=8B=E5=86=85?= =?UTF-8?q?=E5=AD=98=E6=B3=84=E6=BC=8F=EF=BC=88=E6=89=93=E6=AD=A3=E5=BC=8F?= =?UTF-8?q?=E5=8C=85=E6=97=B6=E8=AF=B7=E8=AE=BE=E7=BD=AE=E4=B8=BAfalse?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/x-library.gradle | 2 +- gradle.properties | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/x-library.gradle b/app/x-library.gradle index 2ede0467..5ad8a5c1 100644 --- a/app/x-library.gradle +++ b/app/x-library.gradle @@ -40,7 +40,7 @@ configurations.each { configuration -> configuration.dependencies.add(dependencies.create(deps.xlibrary.xrouter_compiler)) } - if (configuration.name == "debugImplementation") { + if (isNeedLeakcanary.toBoolean() && configuration.name == "debugImplementation") { //内存泄漏监测leak configuration.dependencies.add(dependencies.create(deps.leakcanary)) } diff --git a/gradle.properties b/gradle.properties index ff30b976..5b64db16 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,10 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # org.gradle.parallel=true # 是否打包APK,打正式包时请设置为true,使用正式的签名 isNeedPackage=true +# 是否排除Frpc动态库,打正式包时请设置为true excludeFrpclib=true +# 是否使用leakcanary检测内存泄漏,打正式包时请设置为false +isNeedLeakcanary=false # 是否使用booster优化APK,这里需要注意gradle的版本,对于最新的gradle版本可能存在兼容问题 isUseBooster=false android.precompileDependenciesResources=false