MultiDex and incremental dexing

65 views
Skip to first unread message

Valerio Santinelli

unread,
Jul 16, 2015, 4:35:04 PM7/16/15
to adt...@googlegroups.com
Hello everyone,

is there any news on incremental dexing for projects using MultiDex? I've got a quite large one where I needed to turn MiltiDex on and now it takes a very long time to compile. I suppose that incremental dexing would really help in reducing compile times. So is there any news on this front?

Cheers!

Valerio Santinelli

Xavier Ducrohet

unread,
Jul 16, 2015, 7:09:01 PM7/16/15
to adt...@googlegroups.com
It's not yet incremental though it's something we want to look at in the near future.

--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

Valerio Santinelli

unread,
Jul 17, 2015, 3:31:44 AM7/17/15
to adt...@googlegroups.com
Thanks Xavier, this is something that's definitely needed for large projects.

Have you got any suggestions to decrease the build time in the meanwhile?

Cheers!

Valerio

Artem Zinnatullin

unread,
Jul 17, 2015, 7:57:58 AM7/17/15
to adt...@googlegroups.com
For development purposes you can configure separate product flavor with minSdkVersion 21, this flavor can be build a lot faster than regular one because ART which replaced Dalvik in APIs > 20 supports multiple dex files out of the box, multidex for API <= 20 requires a lot of time to decide what classes should be placed in first dex file.

Valerio Santinelli

unread,
Jul 17, 2015, 8:19:51 AM7/17/15
to adt...@googlegroups.com
Eould it be necessary to set the minSdkVersion to 21 on each module or is it enough to add it to the app's gradle?

Valerio Santinelli

Inviato da iPhone
You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/pgSqZo-OZ84/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.

Xavier Ducrohet

unread,
Jul 17, 2015, 8:01:20 PM7/17/15
to adt...@googlegroups.com
Just on the app.

Valerio Santinelli

unread,
Jul 18, 2015, 6:33:33 AM7/18/15
to adt...@googlegroups.com
That definitely helped. It brought my build time from 1m 35secs to 32secs.

I also tried the beta gradle plugin as suggested here http://stackoverflow.com/a/30776895/443136 but the difference isn't really much.


Valerio Santinelli

Inviato da iPhone
Reply all
Reply to author
Forward
0 new messages