Alexander
Alexander

Reputation: 133

Version controlling Android/Eclipse project with all it's 3rd party libraries

So here is the deal. Let's say I'm developing an app depending on the Facebook SDK and Chris Banes PullToRefreshListView. I import the SDK's to my workspace(which I don't really like since it fills upp the workspace!) and reference it in my app as libraries. I'm making some changes to the PullToRefreshListView, let's say I'm adding a custom font or changing the color of one of the labels.

Now, I'm using Git to version control my project. I would like to be able to put up my project to our Git server and make my colleagues able to pull the project and get to work without having to struggle with getting the same SDK's (of the same versions as I used) setup and referenced in the project. Since I've made some changes to one of the libraries, the project could never be fully restored by another person if I don't provide the code.

All I can find when Googling or searching Stack Overflow is how-to's on using compiled .jar files in the libs folder, which is good but not what I'm looking for.

Essentially, I'm looking for a good way of structuring projects using 3rd party libraries.

Upvotes: 4

Views: 353

Answers (1)

Error 454
Error 454

Reputation: 7315

It sounds like these are android library projects (they contain assets). If that's the case, you can't turn them into JAR files.

The easiest way that comes to mind is to have your root project folder contain your app and all said libraries:

Root
-\Your app
  -\src
  -\res
-\3rd party lib 1
-\3rd party lib 2
-\3rd party lib 3

This structure would make it pretty simple to push to git and manage in eclipse.

Upvotes: 1

Related Questions