From ab864cd171a563177a8f565fc2744e88ba669516 Mon Sep 17 00:00:00 2001 From: orionlee Date: Thu, 3 Jan 2019 13:56:40 -0800 Subject: [PATCH] enable multidex for debug build only, speeding up release build time --- app/build.gradle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index a79ad180e..019757fc1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -39,7 +39,7 @@ android { defaultConfig { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - multiDexEnabled true + multiDexEnabled false versionCode getMyVersionCode() versionName "${getMyVersionName()}" testApplicationId "de.test.antennapod" @@ -84,6 +84,12 @@ android { resValue "string", "provider_authority", "de.danoeh.antennapod.debug.provider" buildConfigField STRING, FLATTR_APP_KEY, mFlattrAppKey buildConfigField STRING, FLATTR_APP_SECRET, mFlattrAppSecret + // debug build has method count over 64k single-dex threshold. + // For building debug build to use on Android < 21 (pre-Android 5) devices, + // you need to manually change class + // de.danoeh.antennapod.PodcastApp to extend MultiDexApplication . + // See Issue #2813 + multiDexEnabled true dexcount { if (project.hasProperty("enableDexcountInDebug")) { runOnEachPackage enableDexcountInDebug.toBoolean()