New issue
Advanced search Search tips

Issue 917426 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Make targets multidex by default

Project Member Reported by agrieve@chromium.org, Dec 21

Issue description

It's been a headache to have builds fail when they hit the multidex limit.
There are times when we want to know if an apk has hit the limit, but for most apks (e.g. test apks & debug apks & sample apps) we don't care.

Now that our build rules handle multidex well, I think we should have:

enable_multidex = true 

be the default.

enable_multidex = false

can be explicitly set to cause breakages when hitting the dex limit.
 
Description: Show this description
Labels: QuickFix
Thought about this as well for enabling multidex for monochrome_bundle. We enabled multidex on the bundle so that the unsplit_dex target will build, but currently the base module's final dex step produces a single dex file. It'd be better to have explicit control over this (ex. in case multidex causes a perf/size regression).

Seems like we want to have the dex() step always enable multidex but then have an assert somewhere to check that the number of dexfiles generated is 1 when enable_multidex = false.

Another thing to update if we do this: Make  (https://cs.chromium.org/chromium/src/base/android/java/templates/BuildConfig.template?l=25) ENABLE_MULTIDEX = false when minSdk >= 21 and _maybe_ make it rely on whether or not multiple dex files were generated.

Sign in to add a comment