Create apk file using rake
===

I have a phonegap based application which is targeting android in this scenario and although android is java, the only bit of java is to kick off phonegap. So as most of the logic is actually html and javascript and used on multiple platforms we opted for a rake based build script (which we used in our standard web based version of the applicaiton), this templates files and minifies javascript and css and packages the overall project (not just the source code).

Now with that out of the way the rake build will test all the javascript and acceptance tests (as the mobile version can be run in a normal browser to prove it works without needing the device), but currently I dont know how to compile the java part of the project. Generally this all seems to use an android based flavour of the java compiler and then ant based tasks to create and deploy the apk file.

So is there a pre build rake task or some command line way to isolate the creating of an apk file? This way I can put it all on my CI server and just output the APK file as an artifact, rather than always needing to open up eclipse manually and packaging it.