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.
- 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.
- 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.
- 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.
- 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