AardvarkA Sane Build Tool

Aardvark is a tool for building projects. It is based on Gosu and Apache Ant. It is intended to provide a comfortable scripting environment while retaining all the functionality that Ant tasks provide.

It has a lot of cool features which we will be documenting in the next few weeks. If you'd like to keep up with this, please join our Google group.

build.vark

Here is an example build.vark file, which is structured just like a Gosu program, with some special sauce:

var srcDir = file("src") var classesDir = file("classes") var distDir = file("dist") function echoHello() { Ant.echo(:message = "Hello World") } function compile() { Ant.mkdir(:dir = classesDir) Ant.javac(:srcdir = path(srcDir), :destdir = classesDir, :includeantruntime = false) } @Depends("compile") function jar() { Ant.mkdir(:dir = distDir) Ant.jar(:destfile = distDir.file("myproject.jar"), :basedir = classesDir) } @Depends("compile") function run() { Ant.java(:classname = "myproject.HelloWorld", :classpath = path(classesDir), :fork = true) } function clean() { Ant.delete(:dir = classesDir) Ant.delete(:dir = distDir) }

Note, in particular, the 'Ant' symbol, which exposes the entire Ant API as functions.

Running Aardvark

To use Aardvark, download and unzip a distribution, and put its bin/ directory on your path.

You run it exactly the same as how you run Ant. Within the directory which contains build.vark, simply run the "vark" executable followed by the desired target name:

$ vark jar Buildfile: myproject/build.vark compile: [mkdir] Created dir: myproject/classes [javac] Compiling 1 source file to myproject/classes jar: [mkdir] Created dir: myproject/dist [jar] Building jar: myproject/dist/myproject.jar BUILD SUCCESSFUL Total time: 0 seconds

If you'd like to use a .vark file that is in another directory and/or named other than build.vark, it is again just like Ant:

$ vark -f other.vark $ vark -f path/to/build.vark $ vark -f path/to/other.vark

VEdit

Aardvark ships with a built in graphical editor for vark files, 'vedit'. You can edit a vark file by using the "vedit" executable in place of "vark"

$ vedit $ vedit -f other.vark $ vedit -f path/to/build.vark $ vedit -f path/to/other.vark