jww
jww

Reputation: 102276

How to have Ant/build.xml print a setting?

I'm working with Ant from the command line with Android. <sdk>/tools/ant//build.xml has lines like the following:

<!-- clean target -->
<target name="clean" depends="-setup, -pre-clean"
        description="Removes output files created by other targets.">
    <delete dir="${out.absolute.dir}" verbose="${verbose}" />
    <delete dir="${gen.absolute.dir}" verbose="${verbose}" />
...

I searched through the XML file, but I only found three usage of the word print (printseeds, printusage and printmapping). So print does not appear to be the way to print values.

How do I add a statement to print out.absolute.dir and gen.absolute.dir?

Upvotes: 1

Views: 2406

Answers (1)

M A
M A

Reputation: 72854

Use the echo task to print the values of the properties as follows:

<echo message="out.absolute.dir: ${out.absolute.dir}" />
<echo message="gen.absolute.dir: ${gen.absolute.dir}" />

Upvotes: 1

Related Questions