How to automate apk generation

Any idea on how we can automate apk file generation with or without eclipse?

Can do with ant

And Hudson/Jenkins can be used to run those Ant scripts. The technology behindert that is called CI (continous integration).
Jenkins even can start and evaluate Unit Tests.