Ok this thread is going to be more like a discussion to the topic mentioned in the title. I googled the whole topic over and over but didn't find a good / acceptable solution for me.
Scenario
Let's assume I have an android project and I need a third-party library for it (for example drag-sort-listview library).
How to integrate it?
Without Git
According to the official documentation and to this thread we should do it like this (simplified!):
- Import Project into eclipse (from existing Android Source)
- Go to your project properties -> Android -> Add the library (from your workspace)
With Git
Make a Git sub-module for the third-party library. Do this in a folder of your project (for example myproject/thirdpartylibs/newLibrary)
Same steps as above but as the "existing Source" choose the one you just cloned into your project
Discussion
For me: this is NOT satisfying at all!
Why?
Firstly: I don't want a library project in my workspace - I just don't care about it. I just want to use it. I want a JAR which I can put in my "libs" folder (as described here). Sadly you can't create Jars out of Library-projects (source) (or is there a hidden way?).
Secondly: Everyone who pulls my project has to manually generate the project of the third-party library and then add it to the project. So if someone just pulls my project it won't work until he does this. Pretty shitty if you ask me.. (or I am missing something here?)
Thirdly: Git sub-module looks like an overkill most of the time. It would be so much easier to just put a JAR in the libs folder and be done with it. Sure it is not much work to do so, but it just adds kind of another layer of "complexity" to your project.
The questions
I am the only one who is annoyed like hell because of this?
How are the big boys doing this (like CyanogenMod, etc.)?
Why are there still JAR libraries out there (for example ORMLite) ? Is this only because they don't need android specific resources and stuff? Or does anyone know WHY they can build a JAR with their libraries and "all" other can't?