diff options
author | Fup Duck <fupduck@sacknagel.com> | 2018-01-21 18:01:26 +0100 |
---|---|---|
committer | Fup Duck <fupduck@sacknagel.com> | 2018-01-21 18:01:26 +0100 |
commit | 6e45a5bcb4de152543b5dd5d9bd2027fb62f7375 (patch) | |
tree | 426b1e4ffe9578c106884ce6aef01d9dfa1ca56e /app/build.gradle | |
parent | 3b6bc548f6197dfbd8a4e55524a3f6e0cdd224c0 (diff) | |
parent | df8b1fcf1ecc55f15229935294a337c897960ff4 (diff) |
Merge remote-tracking branch '0xacab/0.9.8' into 8819_config_wizard_design
Diffstat (limited to 'app/build.gradle')
-rw-r--r-- | app/build.gradle | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/build.gradle b/app/build.gradle index cb865ecd..b28d9f35 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -77,6 +77,9 @@ dependencies { androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.6.3' testCompile 'junit:junit:4.12' testCompile 'org.json:json:20170516' + debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4' + releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' + betaCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' compile 'com.jakewharton:butterknife:6.1.0' provided 'com.squareup.dagger:dagger-compiler:1.2.2' compile 'com.github.pedrovgs:renderers:1.5' @@ -92,6 +95,17 @@ dependencies { compile 'com.android.support:support-fragment:26.1.0' } +// Ensure the no-op dependency is always used in JVM tests. +configurations.all { config -> + if (config.name.contains('UnitTest')) { + config.resolutionStrategy.eachDependency { details -> + if (details.requested.group == 'com.squareup.leakcanary' && details.requested.name == 'leakcanary-android') { + details.useTarget(group: details.requested.group, name: 'leakcanary-android-no-op', version: details.requested.version) + } + } + } +} + def processFileInplace(file, Closure processText) { def text = file.text file.write(processText(text)) |