simplify Leak Canary initialization

This commit is contained in:
tibbi 2017-12-01 23:35:36 +01:00
parent 76e94d2bab
commit a56bbbd54a
2 changed files with 2 additions and 7 deletions

View file

@ -21,14 +21,10 @@ android {
}
buildTypes {
debug {
buildConfigField "boolean", "USE_LEAK_CANARY", "true"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
buildConfigField "boolean", "USE_LEAK_CANARY", "false"
}
}
@ -47,7 +43,7 @@ ext {
}
dependencies {
implementation 'com.simplemobiletools:commons:3.0.20'
implementation 'com.simplemobiletools:commons:3.0.21'
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.8.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
implementation 'com.android.support:multidex:1.0.2'

View file

@ -3,13 +3,12 @@ package com.simplemobiletools.gallery
import android.support.multidex.MultiDexApplication
import com.github.ajalt.reprint.core.Reprint
import com.simplemobiletools.commons.extensions.checkUseEnglish
import com.simplemobiletools.gallery.BuildConfig.USE_LEAK_CANARY
import com.squareup.leakcanary.LeakCanary
class App : MultiDexApplication() {
override fun onCreate() {
super.onCreate()
if (USE_LEAK_CANARY) {
if (BuildConfig.DEBUG) {
if (LeakCanary.isInAnalyzerProcess(this)) {
return
}