简体   繁体   中英

Which is the best structure for an Android SVN project?

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM