android project with sherlock actionbar git

I'm working with several android/iOS projects that are being modified by different developers, designers, QA people and even Clients.

With iOS projects is so much easy to have the whole project including libraries, dependencies and workspaces into a git/svn repo. This way any person can checkout or update the project and run it in just seconds.

With Android is almost the same, except for one thing, some people use intellij/android studio and some use eclipse. This is not a problem apart from the fact that some projects are using sherlock action bar, that's when things get a bit complicated for non dev people.

Sherlock, both in intellij and eclipse are added as a module or a project library dependency and can't be a jar lib because it has resources.

I have some ideas about how to achieve this but would like to see if someone else had solved this in a cleaver way.

1) First idea is to have two separated project folders in the repo, one for the actual project and one for sherlock. Also it would be necessary to include intellij and eclipse workspace and project files, so any person can open it easily.

2) My second idea is to merge the project and sherlock project files into one. The person would have to import project into intellij or eclipse, after that no configuration would be needed.


I finally decided to have an extra folder called "dependencies" inside the project. This folder contains sherlock source.

Finding out which files git ignore is important:

(...)

.idea/libraries
dependencies/sherlock
dependencies
.idea
.idea/libraries/libs2.xml
.idea/misc.xml
.idea/workspace.xml
dependencies/sherlock/sherlock.iml
newsweek-newsweek-android.iml

To avoid having two android support jar files one in each project I left one in sherlock libs folder, removed the one from my project and left added an extra line to my .classpath

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
        <classpathentry kind="con" path="dependencies/sherlock/libs/"/>
        (...)
</classpath>

Now after a git checkout, all people need to do is import from the folder, hit next several times and they can run any project that makes use of sherlock.

链接地址: http://www.djcxy.com/p/60894.html

上一篇: 如何将List <string>绑定到DataGridView控件?

下一篇: android项目与sherlock actionbar git