Closed ghost closed 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.
Just opened a cleaner version of this pull-request :)
Cool! I can mark it now as a duplicate of #107.
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