Add support for running applications from Gradle

Gradle should now be able to support all the same workflows Ant currently does.