clojure-android / lein-droid

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

Enable multidex handling in lein-droid #106

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

Wow, Volker, this is really cool! Before I begin reviewing this (likely in the morning) could you please rebase your changes on top of my current master (instead of merging). That gigantic merge commit isn't really relevant. Same for those revert commits.

ghost commented 9 years ago

Just opened a cleaner version of this pull-request :)

alexander-yakushev commented 9 years ago

Cool! I can mark it now as a duplicate of #107.