Add LeakCanary

pull/413/head
Alex Baker 9 years ago
parent 9912a4fb70
commit 535644976c

@ -97,6 +97,10 @@ dependencies {
apt 'com.jakewharton:butterknife-compiler:8.1.0'
compile 'com.jakewharton:butterknife:8.1.0'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta2'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
compile 'com.nononsenseapps:filepicker:2.5.2'
compile 'com.android.support:design:24.0.0'
compile 'com.android.support:support-v13:24.0.0'

9
proguard.pro vendored

@ -24,3 +24,12 @@
-dontwarn javax.inject.**
-dontwarn com.google.j2objc.annotations.**
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
# https://github.com/square/leakcanary/blob/457175960e341658fc908ee12a9bf803bca63a23/leakcanary-android/consumer-proguard-rules.pro
-dontwarn com.squareup.haha.guava.**
-dontwarn com.squareup.haha.perflib.**
-dontwarn com.squareup.haha.trove.**
-dontwarn com.squareup.leakcanary.**
-keep class com.squareup.haha.** { *; }
-keep class com.squareup.leakcanary.** { *; }
-dontwarn android.app.Notification

@ -3,6 +3,7 @@ package org.tasks;
import android.content.res.Configuration;
import android.util.Log;
import com.squareup.leakcanary.LeakCanary;
import com.todoroo.astrid.dao.Database;
import com.todoroo.astrid.dao.MetadataDao;
import com.todoroo.astrid.dao.StoreObjectDao;
@ -51,6 +52,8 @@ public class Tasks extends InjectingApplication {
public void onCreate() {
super.onCreate();
LeakCanary.install(this);
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
} else {

Loading…
Cancel
Save