Merge pull request #2955 from orionlee/make_multidex_on_debug_build_only

enable multidex for debug build only, speeding up release build time
This commit is contained in:
H. Lehmann 2019-08-11 14:58:14 +02:00 committed by GitHub
commit ffe98e2225
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -13,7 +13,7 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled true
multiDexEnabled false
vectorDrawables.useSupportLibrary true
// Version code schema:
// "1.2.3-SNAPSHOT" -> 1020300
@ -63,6 +63,14 @@ android {
debug {
applicationIdSuffix ".debug"
resValue "string", "provider_authority", "de.danoeh.antennapod.debug.provider"
// 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()