Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which is the best structure for an Android SVN project?

Tags:

android

svn

Which is the better structure for an SVN repository that will hold a single Android project (and why)?

http://myserver/svn
    /trunk
        /MyProject
            /src
            /res
            /assets
    /branches
    /tags

or

http://myserver/svn
    /trunk
        /src
        /res
        /assets
    /branches
    /tags

Basically I want to know if the project root folder should be explicitly named in the hierarchy. The repository will only hold one project but it will have many branches and tags. I'm using Eclipse with an SVN plug-in.

Thanks,

Barry

like image 378
Barry Fruitman Avatar asked Jul 21 '11 04:07

Barry Fruitman


2 Answers

What I am generally doing (both for android and other technologies such as PHP -- and for SVN and other source control software such as Bazaar or Git), is something like this :

http://myserver/svn
    /MyProject
        /trunk
            /sources
                /src
                /res
                /assets
            /ressources
                => Here, I can put text files, documentation, ...
                that is really part of the projet -- but not part of the application
        /branches
        /tags


So, pretty close to your first idea, except :

  • I can have more than one project on my SVN server,
  • Each projet has its own trunk/branches/tags
  • In each project, I have the source code ; and some other directories that are not part of the application, but related-enough to be in the SVN of the project
like image 197
Pascal MARTIN Avatar answered Oct 20 '22 22:10

Pascal MARTIN


I would have it like this:

http://myserver/svn
    MyProject1
        /trunk
            /src
            /res (external)
            /assets
        /branches
        /tags
    MyProject2
       /trunk
           /src
           /res (external)
           /assets
       /branches
       /tags
    resources

Haven't done much of Android development, but stuff like resources I usually keep outside the main source structure and make use of svn:externals to link think and potentially use them across various projects

like image 27
manojlds Avatar answered Oct 20 '22 22:10

manojlds