Reputation: 15069
I am committing an Android project to a repository for the first time and I have some queries,
Firstly I just want to be sure if it is alright not to commit the /gen
and /bin
folders?
Secondly, could you please advise me as to what kind of structure is recommended for the repository for android projects.
Currently I have one application, but in the future I expect to create other flavours of the app.
Here are the current projects that need to go in to repo.
Both the application and free application use the library project..
Finally any advice on which version control system is actively used? I have experience with Source Safe and Subversion. Not quite familiar with Git.
Upvotes: 1
Views: 930
Reputation: 4946
If I can assume you are using Eclipse for development, subclipse is very easy to use. If there others for Git, I'm not sure since I use SVN.
Anything that is generated with each build should be left out, so gen and build folders can be safely ignored by your version control system, as with any references to other projects. Each project should have its own repository.
Generally, the convention followed in SVN repositories have the followinf structure:
reponame
|-trunk
| |- main_project_folder
|- tags
|- branches
If you're thinking about using Git, have look at the link provided by @dmon.
Upvotes: 1
Reputation: 1156
I'm no Android expert, so take this with a grain of salt...
In general you do not want to commit any generated binaries into the repository. The main exception to this is any third party libraries the code depends on. Those should go in a separate directory.
The Library should be in one repo, and the Application(s) in another. Depending on how close the two apps are you can have both in one repo and just have build-time config that determines which is built, etc.
I strongly recommend using git. The other systems you mention are no longer first class choices for version control.
Upvotes: 1
Reputation: 30168
Yes, you can (and should) leave the /gen and /bin folders out of your commit. You can use any structure you'd like, but you can base yours off of an existing project, like Gaug.es, for example. For source control system, you can use whatever you'd like, Git has been gaining quite a bit of traction as of late though. You should learn Git anyway, as it will definitely come in handy.
Upvotes: 1