I have to develop an Android library which needs to be packaged and distributed to Android developers. It has both Java classes and resources (icons etc).
I'm wondering about the best way of distributing such a library. As we all know many well-known libraries are distributed in different formats:
- ActionBAr Sherlock - ZIP or APKLIB
- Flurry - JAR
My Prerequisites:
- I can't distribute sources - only compiled java classes and resources are allowed
- My aim is to have integration with client project instruction as simple as possible - e.g. one line in Maven/Gradle as dependency and few lines of code how to use it within the app.
- I have to respect every build system: those using NBS, those using android-maven-plugin and those using legacy ANT.
My first idea was to distribute this library as APKLIB (Maven) and AAR (NBS) but then I realized no support for ANT.
Questions:
- Can APKLIB and AAR have only compiled classes and resources instead of plain Java sources?
- How to distribute a compiled android library project for ANT? As a ZIP?
- What about generating R for libraries?
Thanks for any suggestions!