Or: How to set up your Android app’s Multi Module Maven build as Eclipse project.
This week I spend a few hours searching for a solution for automated Android builds with Maven. I want to launch my first paid app with minimum fuss. There is a free version of the app on the market already and now I want to use a multi module Maven project to manage both a free and a paid version of the same app comfortably. I am a lazy programmer after all.
Since it was not quite the trivial endeavour I had hoped – but of course not expected – it to be, I decided to write this up as an article for myself and of course for all the other Android developers out there who don’t want to waste time setting up projects when they could be gold-plating their apps
You are probably only reading this after you have already created your app and have everything running from Eclipse. And it works, too, up to a certain point. I only started on automated builds when it started hurting me to not have them. So I won’t cover setting up a fresh project. You should have some working knowledge of Maven and Android. I will assume you have both setup Android and Maven projects in the past.
This article assumes that you have an Android project without an automated build somewhere. If you don’t have one just create a new Android project in Eclipse, this will give you a HelloWorld app and everything that is necessary to follow the instructions in this article. Please don’t recycle your project, you can easily copy over your classes and resources later. Start from scratch with the setup until you have understood what is going on – there’ll be less crying if you don’t break your working project along the way. If you really want to do this on an existing project, tag now!
Continue reading →