Browse Source

build: Disable LeakCanary unless manually activated with a property

Use `./gradlew installGplayDebug -P "leakCanary"`, for example, to activate it.

LeakCanary dramatically slows down normal development work due to app freezes for memory dumps.

This way we can avoid that, but still use it when we want to check for leaks. I don't think leaks should be a primary focus right now,
since we have other stuff to work on first.

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
Álvaro Brey Vilas 3 năm trước cách đây
mục cha
commit
21ed337184
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/build.gradle

+ 1 - 1
app/build.gradle

@@ -303,7 +303,7 @@ dependencies {
         }
     }
 
-    if (!ciBuild) {
+    if (project.hasProperty("leakCanary")) {
         debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
     }