Bug 1306104 - Disable LeakCanary for localOld builds to keep single-dex gradle builds under 65k methods r=nalexander,sebastian

MozReview-Commit-ID: KmMgaHC37cj

--HG--
extra : rebase_source : b1b0ba8a5fea3d22edd830379296dd4a292021ed
This commit is contained in:
Andrzej Hunt 2016-09-28 13:43:29 -07:00
parent 4696fefe72
commit 216129b6af

View File

@ -219,9 +219,15 @@ dependencies {
compile "com.google.android.gms:play-services-measurement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
}
// Gradle based builds include LeakCanary. Gradle based tests include the no-op version. Mach
// based builds only include the no-op version of this library.
compile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
// Include LeakCanary in most gradle based builds. LeakCanary adds about 5k methods, so we disable
// it for the (non-proguarded, non-multidex) localOld builds to allow space for other libraries.
// Gradle based tests include the no-op version. Mach based builds only include the no-op version
// of this library.
// It doesn't seem like there is a non-trivial way to be conditional on 'localOld', so instead we explicitly
// define a version of leakcanary for every flavor:
localCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
localOldCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
automationCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
compile project(':thirdparty')