Multiple Projects, Common Module [closed]
-
26-09-2019 - |
Question
I have a library of common functions that I use in several different projects, which works fine on my local machine where I can just add the path to the library, but now that I've put several of my projects on GoogleCode, I'm not sure how to deal with the external library. Do I put copies of it in each project and try to keep them all synchronized with each other, or is there a better way?
Solution
I use subversion for source control and svn:externals to manage libraries. Since you're using Mercurial, you might have a look at using subrepositories.
Subrepositories is a feature that allows you to treat a collection of repositories as a group. This will allow you to clone, commit to, push, and pull projects and their associated libraries as a group.
Good luck!
OTHER TIPS
You never want to have multiple copes if your source code.
Simple way -> Have subprojects compile down to a .jar. Include the .jar in your main project. When you change a subproject, make a new .jar and copy it down.
Better way -> Use something like Maven to manage it for you