dimanche 3 janvier 2016

Testing my maven library compatibility with Android

TL;DR

I have a Java project that I build and test with maven. What it the simplest way to run my junit tests on an Android sdk?

More details

After a commit, a user open a bug report to explain that I broke the compatibility with android since I introduced a dependency on javax.xml.bind and this package doesn't exist on Android.

Now I managed to implement my feature without using this package, and I'd like to be sure I don't break this compatibility anymore. Consequently I'd like to run my existing junit4 tests on the Android Sdk. The issue is that I'm an Android noob, and I'm starting to drown under documentations:

  • would using local unit tests fit my needs?
  • If yes, may I use them with maven or shall I switch to gradle first?
  • Or must I go through the burden of using instrumented unit tests? (Are those even usable given that there's no notion of UI at all in my project?)

Aucun commentaire:

Enregistrer un commentaire