I just accidentally discovered the ant task for test coverage reports with emma. I'm now looking for a target that only invokes the unit test and generates unit testing output. Is there a list with the available ant targets somewhere, or is it possible to look them up somewhere inside the code of the SDK?
Is there a list with the available ant targets somewhere, ...
You can get a list of all ant
targets with -projecthelp
and -verbose
. While in the root directory of the project:
$ ant -projecthelp -verbose
The private ones show under the heading "Other targets:", but the targets with a leading dash are impossible to invoke from the command line. You can add a "wrapper" target to your build.xml
and simply make it depend on the target you want.
I use ones like this for exposing the main targets to the IntelliJ IDEA platform:
<!-- Wrapper targets for setting up IntelliJ IDEA with Ant Build -->
<target name="Android clean" depends="clean" />
But you could also do something like:
<target name="Generate Resource Source" depends="-resource-src" />
Is there a list with the available ant targets somewhere
Not that I am aware of. I can't even see how to get Ant to dump a list. :-(
is it possible to look them up somewhere inside the code of the SDK?
They're on your development machine in $ANDROID_HOME/platforms/$API/templates
, where $ANDROID_HOME
is where you installed the SDK and $API
is some Android version (e.g., android-2.1
).
ant help
would display all the available targets with detailed description.
Help target is at the end of ${SDK.HOME}/tools/ant/build.xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With