Technical docs‎ > ‎

Ant Build Script

The goal of this doc is describing how the default build.xml file works for people who want to modify it to their needs.

Work in progress.

Current Help output (not up to date apparently).

     [echo] Android Ant Build. Available targets:
     [echo]    help:      Displays this help.
     [echo]    clean:     Removes output files created by other targets.
     [echo]               The 'all' target can be used to clean dependencies
     [echo]               (tested projects and libraries)at the same time
     [echo]               using: 'ant all clean'
     [echo]    debug:     Builds the application and signs it with a debug key.
     [echo]               The 'nodeps' target can be used to only build the
     [echo]               current project and ignore the libraries using:
     [echo]               'ant nodeps debug'
     [echo]    release:   Builds the application. The generated apk file must be
     [echo]               signed before it is published.
     [echo]               The 'nodeps' target can be used to only build the
     [echo]               current project and ignore the libraries using:
     [echo]               'ant nodeps release'
     [echo]    instrument:Builds an instrumented package and signs it with a
     [echo]               debug key.
     [echo]    test:      Runs the tests. Project must be a test project and
     [echo]               must have been built. Typical usage would be:
     [echo]                   ant [emma] debug installt test
     [echo]    emma:      Transiently enables code coverage for subsequent
     [echo]               targets.
     [echo]    install:   Installs the newly build package. Must either be used
     [echo]               in conjunction with a build target (debug/release/
     [echo]               instrument) or with the proper suffix indicating
     [echo]               which package to install (see below).
     [echo]               If the application was previously installed, the
     [echo]               application is reinstalled if the signature matches.
     [echo]    installd:  Installs (only) the debug package.
     [echo]    installr:  Installs (only) the release package.
     [echo]    installi:  Installs (only) the instrumented package.
     [echo]    installt:  Installs (only) the test and tested packages (unless
     [echo]               nodeps is used as well.
     [echo]    uninstall: Uninstalls the application from a running emulator or
     [echo]               device. Also uninstall tested package if applicable
     [echo]               unless 'nodeps' is used as well.

Computed Target graph

nodeps :

test : -test-project-check >

debug : -set-mode-check > -set-debug-files > -set-debug-mode > -debug-obfuscation-check > -setup > -build-setup > -pre-build > -code-gen > -pre-compile > -compile > -post-compile > -obfuscate > -dex > -crunch > -package-resources > -package > -post-package > -do-debug > -post-build >

emma :

help :

clean : -pre-clean >

uninstall :

all : -setup >

installr : -set-mode-check > -set-release-mode > install >

install :

instrument : -set-mode-check > -set-instrumented-mode > -set-debug-mode > -debug-obfuscation-check > -setup > -build-setup > -pre-build > -code-gen > -pre-compile > -compile > -post-compile > -obfuscate > -dex > -crunch > -package-resources > -package > -post-package > -do-debug >

installt : -test-project-check > -set-mode-check > -set-debug-files > install > installd >

installi : -set-mode-check > -set-instrumented-mode > install >

release : -set-mode-check > -set-release-mode > -release-obfuscation-check > -setup > -build-setup > -pre-build > -code-gen > -pre-compile > -compile > -post-compile > -obfuscate > -dex > -crunch > -package-resources > -package > -post-package > -release-prompt-for-password > -release-nosign > -release-sign > -post-build >

installd : -set-mode-check > -set-debug-files > install >