Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed LeakCanary #5784

Merged
merged 6 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/dependencies/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object Dependencies {
const val gson = "com.google.code.gson:gson:2.10.1"
const val firebase_analytics = "com.google.firebase:firebase-analytics:21.3.0"
const val firebase_crashlytics = "com.google.firebase:firebase-crashlytics:18.3.7"
const val leakcanary = "com.squareup.leakcanary:leakcanary-android:2.11"
const val leakcanary = "com.squareup.leakcanary:leakcanary-android:2.12"
const val timber = "com.jakewharton.timber:timber:5.0.1"
const val slf4j_api = "org.slf4j:slf4j-api:2.0.7"
const val slf4j_timber = "com.arcao:slf4j-timber:3.1@aar"
Expand Down
3 changes: 2 additions & 1 deletion collect_app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,9 @@ dependencies {
exclude group: 'org.robolectric' // Some tests in `collect_app` don't work with newer Robolectric
}

// Real LeakCanary for debug builds only: notifications, analysis, etc
// Real LeakCanary for debug and selfSigned builds only: notifications, analysis, etc
debugImplementation Dependencies.leakcanary
selfSignedReleaseImplementation Dependencies.leakcanary
}

// Must be at bottom to prevent dependency collisions
Expand Down
6 changes: 6 additions & 0 deletions collect_app/src/main/res/values/leak_canary_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- This is needed to enable LeakCanary according to https://square.github.io/leakcanary/changelog/#api-breaking-bettering-changes -->
<string name="leak_canary_test_class_name" translatable="false">androidx.test.ext.junit.runners.AndroidJUnit4</string>
<bool name="leak_canary_allow_in_non_debuggable_build">true</bool>
</resources>
1 change: 1 addition & 0 deletions config/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
</issue>
<issue id="UnusedResources" severity="error">
<ignore path="res/values/dimens.xml" />
<ignore path="res/values/leak_canary_config.xml" />
<ignore regexp="ga_trackingId|google_crash_reporting_api_key|project_id|third_party_licenses|third_party_license_metadata" />
<ignore regexp="sms_invalid_phone_number_description" />
<ignore regexp="mapbox_access_token" />
Expand Down