zutubi android ant

Zutubi Android Ant provides a collection of Ant tasks that are useful for Android projects. These tasks are intended to complement the Ant support provided by the Android SDK.

quick start

For the impatient, here is an overview of how to add the Zutubi tasks to your Ant builds:

  • Grab the jar from the downloads page and add it to your source tree.
  • Define a namespace for the tasks by editing the root element in your Ant build.xml (or custom_rules.xml) file:
    <project name="my-android-project"
             xmlns:zaa="antlib:com.zutubi.android.ant">
  • Nested within the same root element, import the tasks (edit the jar path as required):
    <taskdef uri="antlib:com.zutubi.android.ant"
    	 resource="com/zutubi/android/ant/antlib.xml"
    	 classpath="path/to/zutubi-android-ant.jar"/>
  • Reference the tasks using the defined namespace prefix in your targets as desired:
    <target name="run-lint">
        <zaa:lint>
            <arg line="--check MissingPrefix /src/astrid/">
        </zaa:lint>
    </target>

For details about available tasks see below.

license

Zutubi Android Ant is available under the Apache License, version 2.0. The license is quite liberal, even for commercial applications. See the LICENSE file for details.

task overview

Zutubi Android Ant includes the following tasks (drill down for details):

Task Name Description
addusedpermission Adds a new uses-permission element to a manifest file.
bumpversion Increments the versionCode attribute of a manifest file, and optionally the versionName attribute.
getversion Sets Ant properties to the values of the versionCode and versionName attributes of a manifest file.
jsonversion Generates a JSON file suitable for use with cwac-updater.
libproperties Generates .properties files alongside .jar files for automatic linking of library sources in Eclipse.
lint Convenience task for running the lint tool based on sdk.dir and the host OS.
ndkbuild Convenience task for running ndkbuild based on ndk.dir and the host OS.
removeusedpermission Removes existing uses-permission elements from a manifest file.
setmanifestattributes Adds or updates arbitrary attributes of the <manifest> element in a manifest file.
setversion Updates the versionCode and/or versionName attributes in a manifest file.

more information

Want to learn more? Check out the following resources:

feedback

If you have any thoughts, questions etc about the tasks, you can contact me at:

jason@zutubi.com

Or you can submit an issue or pull request via GitHub. All feedback is welcome.