RSS Feed

One POM to rule them all!

Posted on Tuesday, February 5, 2013 in Coding

GnuCash for Android has been developed with the goals of simplicity, usability and broad compatibility. In order to apply modern Android Design guidelines for the user experience of the app while maintaining broad compatibility, I am using the ActionBarSherlock library. This meant that I had to download the library and include it in my project, as well as distribute it with the source code to allow others to quickly checkout and build the code.


This has become cumbersome in a couple of ways.

  1. In order for Eclipse to properly find references to Android library projects, they need to also be imported into the workspace. The idea of distributing the library with the GnuCash for Android source code bugs me.
  2. Updating the library project becomes a burden. Every time it updates, I need to download the source, replace the old source code, import it into Eclipse and then make a large commit for the library source into version control.
  3. GnuCash for Android also uses Robotium for testing. Admittedly it is just one jar file, but has to also be distributed with the source and updating is also cumbersome.
  4. There are other libraries which I may use in the future like Roboguice and others which will really inflate the size of the source code with dependencies.

The status quo is not sustainable and there has to be a better way. Enter Maven, the build project management tool which also manages dependencies. I had introduced Maven build support to the GnuCash for Android project some while ago, but due to the Eclipse requirement for importing apklibs, I still had to distribute the ABS library with the project.

Well, now I am going all-in with Maven and removing support for IDE-specific project files. You can always import the code into Eclipse as a maven project it should setup everything right. This is also mostly a painless switch for me because I am now using IntelliJ IDEA 12 going forward. It has one feature which I really appreciate, and that is downloading any Android library dependencies, importing and properly referencing them.

If you are using Eclipse, then you would need to download the apklib dependencies (ActionBarSherlock) and import into your workspace and also properly reference the library project. Eclipse maven plugins should be able to handle the other dependencies just fine.

I should also note that the name of the GnuCash for Android project on GitHub has been changed from GnucashMobile to gnucash-android. If you have cloned the repository, you may need to rename your remote repository.

So checkout the code and send me that pull request which you’ve been sitting on 🙂

Share and Enjoy:
  • Twitter
  • Google Bookmarks
  • Digg
  • Facebook

Bring on the comments

  1. Elliott says:

    You’re using git, ActionBarSherlock is using git. Maybe you want to look into using submodules:

  2. Piotr Drąg says:

    Nice use of Tengwar, you almost did it right. 🙂

Leave a Reply