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