I have a master build file that I use to build a series of Android projects. Each of these Android projects reference the same Android library project (I'll call it CoreLibrary). The following is my subant task.
<target name="build" description="Builds (only) all applications">
<subant>
<target name="debug" />
<fileset refid="all-applications" />
</subant>
</target>
Question: Is there something I can do to prevent CoreLibrary from being re-built for each Android project in the all-applications fileset of my subant task? This would significantly speed up my build-time so I am hoping there is something I can do.
Actually, I just recently figured out a way to solve this problem. The basic idea is that, my ANT file finds all library projects, builds them first, and then builds the remainder of my projects with the
nodepstarget. This effectively prevents the situation where CoreLibrary is constantly re-compiled.Note This solution could be improved if I wrote a task that actually found the library dependency order so I could build libraries with the nodeps target. Additionally, there is probably a way to automatically detect "normal projects", but I haven't needed that yet. Finally, I unrolled quite a few things from my normal ANT file to bring this here so hopefully I didn't miss anything. The concept, however, is present.