From 6ee41177cd244a893142c2fd6efd4a0f0745c4a6 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Sat, 9 Dec 2023 18:06:01 +0100 Subject: [PATCH] build: Install LeakCanary in debug builds (#308) --- app/build.gradle.kts | 2 ++ gradle/libs.versions.toml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8dff34dd3..f3f2d199e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -187,6 +187,8 @@ dependencies { implementation(libs.kotlin.result) implementation(libs.semver) + debugImplementation(libs.leakcanary) + testImplementation(projects.core.testing) testImplementation(libs.androidx.test.junit) testImplementation(libs.robolectric) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d97456ffe..c0d851b3c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -42,6 +42,7 @@ kotlin = "1.9.20" kotlin-result = "1.1.8" ksp = "1.9.20-1.0.14" image-cropper = "4.3.2" +leakcanary = "2.12" lint = "31.2.0" # = agp + 23.0.0 (= 8.2.0), see https://github.com/googlesamples/android-custom-lint-rules#lint-version material = "1.10.0" material-drawer = "9.0.2" @@ -153,6 +154,7 @@ kotlinx-coroutines-rx3 = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-rx kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" } image-cropper = { module = "com.github.CanHub:Android-Image-Cropper", version.ref = "image-cropper" } +leakcanary = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanary" } lint-api = { module = "com.android.tools.lint:lint-api", version.ref = "lint" } lint-checks = { module = "com.android.tools.lint:lint-checks", version.ref = "lint" } lint-cli = { module = "com.android.tools.lint:lint", version.ref = "lint" }