clojure-android / lein-droid

A Leiningen plugin for building Clojure/Android projects
Eclipse Public License 1.0
645 stars 56 forks source link

Adapt for multidex handling #107

Closed ghost closed 9 years ago

ghost commented 9 years ago

With this patch, it is possible to build an application consisting of more than one dex File, by setting the --multi-dex option in :dex-opts.

Rather than forcing dex to output a classes.dex file, this modification only passes the target directory as the output directory, which causes dex to automatically create classes2.dex, classes3.dex... etc. when the --multi-dex option is enabled.

Since ApkBuilder only provides constructors that only accept one dex file, the ApkBuilder is constructed without any dex file. Instead all files with a *.dex extension are retroactively added to the APK.

For details see http://blog.osom.info/2014/10/multi-dex-to-rescue-from-infamous-65536.html

alexander-yakushev commented 9 years ago

Everything looks good. Do you specify --multi-dex option in the project.clj in :dex-opts? Does it makes sense to make it default?

alexander-yakushev commented 9 years ago

OK, I've read the blogpost, this is is not as easy as adding --multi-dex. I guess this doesn't have to be default until things settle down.