Need more tasks for custom dex loading (to resolve DEX limit issue)

286 views
Skip to first unread message

gorgo...@gmail.com

unread,
Dec 16, 2013, 8:38:37 PM12/16/13
to gradle-androi...@googlegroups.com
There is a well-known issue in Android when an app that reached DEX limit can't be built.

And looks like there is still no official solution from Google yet.

One of the best-known not official solutions is to split project and libraries classes like the following:
- keep only main project's classes.dex file
- move libraries classes.dex to assets folder
- during application startup dynamically read lib's classes.dex from the assets folder

Of course it would be great to have an official solution to extend current DEX limit.

Or, at least, add to android gradle plugin well-known 'jar' task from 'java' plugin.
If it is be added, then it would really help to easy prevent packaging all library *.class files in the same classes.dex, simply by customizing 'jar' task: 
configure(jar) {
 include 'classes.dex' 
}

Thank you, 
goRGon

Thuy Pham

unread,
May 23, 2014, 3:54:26 AM5/23/14
to gradle-androi...@googlegroups.com
Hi goRGon,

I spent much time for this issue, but i can't resolve it without proguard. But build proguard is long so not suitable for build test. 
 but i don't know where java plugin 'jar' in android studio. Please tell me how to implement it.

Thanks,
Thuypt.

goRGon Development

unread,
Jun 19, 2014, 1:19:09 PM6/19/14
to gradle-androi...@googlegroups.com
Hello Thuy,

Looks like android plugin doesn't have jar task, so it can't be customized not to include lib jar files.
My team decided not to switch to gradle because of it and we still use Eclipse with customized Eclipse build utils or you can even specify Makefile as a part of Eclipse task.

Best Regards,
Igor


--
You received this message because you are subscribed to a topic in the Google Groups "gradle-android-plugin-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gradle-android-plugin-users/zG_xUeVaV7s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gradle-android-plug...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages