Enable `--multi-dex` option in ant for Android

Nickolai Astashonok picture Nickolai Astashonok · Jan 12, 2015 · Viewed 10.2k times · Source

It's easy to enable multi-dex option for gradle build system, but I haven't found example how I can enable this option for ant building. How can archive this?

Answer

Nickolai Astashonok picture Nickolai Astashonok · Jan 12, 2015

We have 2 options:

  1. Change DexExecTask [introduce new parameter for multi dex], compile ant.jar, use this jar for building. I don't like this option, coz we have to provide updated ant.jar for all team members.
  2. Modify project build.xml file. I have found awesome ant build file, that has all modifications for support multi-dex: https://github.com/ruboto/ruboto-irb/blob/master/build.xml

Hope, that it helps.