Let me preface by saying that I am new to Ant. As in, I just started learning it 2 days ago in order to accomplish this task.
What I\'m trying to do is create a \"m
Here are some general guidelines (not rules, Ant is quite liberal):
import
task is generally used to share some comme piece of build mechanic, not a piece of build workflow like you are doing. For instance a target to build jar, parameterized by some properties like the target directory.subant
and ant
tasks are preferred used to trigger builds of other projectSo here is what would look like a build.xml for project D:
<project name="CommonJava" default="makeCommonJavaJar" basedir=".">
<target name="build-deps">
<ant antfile="../Common/build.xml" target="makeCommonJar"/>
<ant antfile="../CommonAndroid/build.xml" target="makeAndroidJar"/>
</target>
<target name="makeCommonJavaJar" depends="build-deps">
<mkdir dir="build" />
<jar jarfile="./build/commonjava.jar" includes="*.class" />
</target>
</project>
See http://ant.apache.org/manual/Tasks/ant.html