From ba8834d3f7369586482a7cb9f1e37daf48d1a027 Mon Sep 17 00:00:00 2001 From: cketti Date: Sun, 18 Oct 2020 16:27:14 +0200 Subject: [PATCH] Make using LeakCanary in debug builds optional --- app/k9mail/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/k9mail/build.gradle b/app/k9mail/build.gradle index d67faedcd..2d7711b58 100644 --- a/app/k9mail/build.gradle +++ b/app/k9mail/build.gradle @@ -26,7 +26,9 @@ dependencies { implementation "com.github.bumptech.glide:glide:${versions.glide}" annotationProcessor "com.github.bumptech.glide:compiler:${versions.glide}" - debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4' + if (project.hasProperty('k9mail.enableLeakCanary') && project.property('k9mail.enableLeakCanary') == "true") { + debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4' + } // Required for DependencyInjectionTest to be able to resolve OpenPgpApiManager testImplementation project(':plugins:openpgp-api-lib:openpgp-api')