diff --git a/app/build.gradle b/app/build.gradle index 1fce372..62926d2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -20,10 +20,14 @@ 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" } } @@ -37,8 +41,15 @@ android { } } +ext { + leakCanaryVersion = '1.5.4' +} + dependencies { implementation 'com.simplemobiletools:commons:2.41.5' + + debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion" + releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion" } Properties props = new Properties() diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7072c89..db55b59 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -10,6 +10,7 @@ tools:node="remove"/>