So there I was, just a hackin' and a codin' a mod for Minecraft in Eclipse. And at the end, there's a bunch of stuff to do: Run a couple special external tools, relocate a bunch of files into a new folder tree, and then zip them up, add comments to the zip file, and so on. And I had a pretty cool batch file to do all that. Then someone showed me ANT, and I'm sold.
Ant does all the stuff I was doing, but much more elegantly. The tool uses an xml file, usually called build.xml, and it looks like this:
<project> <target> <!-- do some stuff --> </target> <target> <!-- do some other stuff --> </target> </project>
The build.xml that I made for my Minecraft modding endeavors looks like so:
It can do advanced stuff, like substituting a token string during a copy operation. Within my source files is @VERSION@, but when copied by the build.xml, that string gets replaced.
Edited by AngleWyrm, 31 July 2013 - 11:54 PM.