We have two in-house projects, A and B, developed by different teams with B dependent on A. Since source code for both projects is stored in git, I've included project A as a submodule into project B and configured the build system to build both in right order. An alternative solution would be to consume A via a binary repository manager such as Artifactory or Nexus.
I wonder about pros and cons of depending on source code vs depending on binary artifacts. When is one better than the other? So far I managed to come up with following factors, but I am really keen on hearing other opinions.
Depending on source code is better
- if you don't have a binary repository manager
- if you need to depend on pre-release version of another project
- if you need to patch another project
- because it is easier to browse dependency source code in IDE
Depending on binaries is better
- to minimize build time
- to avoid the hassle of setting up another project's build environment