From ca21a9cd53fe76095c4806f602c8627eeca39beb Mon Sep 17 00:00:00 2001 From: greenart7c3 Date: Wed, 15 Jul 2026 15:52:25 -0300 Subject: [PATCH] Add LeakCanary to debug builds Adds the LeakCanary dependency to the version catalog and includes it as a debugImplementation in the app module to help detect memory leaks during development. --- app/build.gradle.kts | 1 + gradle/libs.versions.toml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ef734b56..2983054c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -247,6 +247,7 @@ dependencies { androidTestImplementation(libs.ext.junit) androidTestImplementation(libs.espresso.core) androidTestImplementation(libs.ui.test.junit4) + debugImplementation(libs.leakcanary) debugImplementation(libs.ui.tooling) debugImplementation(libs.ui.test.manifest) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5c75afd0..7e523c81 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -33,6 +33,7 @@ coroutinesTest = "1.11.0" kmpTor = "2.6.0" kmpTorResource = "409.5.0" secp256k1Jni = "0.23.0" +leakcanary = "1.0.0" [libraries] datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" } @@ -83,6 +84,7 @@ kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-t kmptor-runtime = { module = "io.matthewnelson.kmp-tor:runtime", version.ref = "kmpTor" } kmptor-resource-exec = { module = "io.matthewnelson.kmp-tor:resource-exec-tor", version.ref = "kmpTorResource" } secp256k1-jni-jvm = { module = "fr.acinq.secp256k1:secp256k1-kmp-jni-jvm", version.ref = "secp256k1Jni" } +leakcanary = { group = "com.android.tools.studio.leakcanary", name = "leakcanary", version.ref = "leakcanary" } [plugins] androidLibrary = { id = "com.android.library", version.ref = "agp" }