mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-22 03:54:18 -04:00
Add leak canary stub as a dependency for all builds by default
This commit is contained in:
parent
59f0b7f732
commit
fba4adf0f1
@ -120,9 +120,19 @@ dependencies {
|
||||
androidTestImplementation "org.mockito:mockito-android:2.7.22"
|
||||
|
||||
// Leak canary
|
||||
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
|
||||
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
|
||||
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
|
||||
implementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
|
||||
// Only enable leak canary in debug builds
|
||||
configurations.all { config ->
|
||||
if (config.name.contains('debug') || config.name.contains("Debug")) {
|
||||
config.resolutionStrategy.eachDependency { details ->
|
||||
if (details.requested.group == 'com.squareup.leakcanary' &&
|
||||
details.requested.name == 'leakcanary-android-no-op') {
|
||||
details.useTarget(group: details.requested.group, name: 'leakcanary-android',
|
||||
version: details.requested.version)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set custom app import directory
|
||||
|
Loading…
x
Reference in New Issue
Block a user