Procházet zdrojové kódy

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 před 3 roky
rodič
revize
21ed337184
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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'
         debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
     }
     }