Search code examples
androidantbuild-systemandroid-multidex

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


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?


Solution

  • 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.