libmx3 / mx3

a sample project showcasing/collecting cross platform techniques on mobile
MIT License
1.17k stars 149 forks source link

Question on repo setup #81

Open fluxxion82 opened 8 years ago

fluxxion82 commented 8 years ago

So at my company we've developed at shared c++ library for our mobile apps and we modeled our projects after this libmx3 example and similar projects, but wanted to ask about how you guys set up the repos. Do you have the android and ios project repos as submodules of the repo containing the c++ code, or is there a good way to keep them separate but easily updatable? If they're submodules or folders in the main repo holding the c++ code as well, then do the mobile devs need to work in the main c++ repo? I tried to do a little research on this and it seems like it's best to keep the repos next to each other, but it seems more natural to have the c++ library stuff as a submodule of the mobile projects, however that doesn't seem possible with this current setup. Any thoughts or advice you can share? Thanks!

skabbes commented 8 years ago

In my opinion, the best is to have them be in the same repo - this allows changes to shared code to be transactional, and refactoring is much easier.

However, for some - this setup doesn't work. In that case, I think I would suggest the C++ code be a submodule of the mobile codebases. The other way around, where mobile is a submodule of the C++ code seems completely backward to me - I'm not sure how that would work.

fluxxion82 commented 8 years ago

Thanks for the reply! How would the c++ code be a submodule of the mobile codebases? Would you copy the c++ source into each platform that uses it? I can't figure out a good way that could work. The current setup in the libmx3/mx3 project looks like the mobile projects could be submodules of the mx3 project - the example_android and ios sit in the libmx3 project so it seemed natural that they could become submodules, however they can't stand alone without changes. But as this project stands, the mobile developers would check out the mx3 project as a whole, with each platform project?