Our project uses Gradle (whose dependency system is compatible with Maven IIUC). When depending on external projects, we try to depend on stable versions. Sometimes we have to depend on a development version. And sometimes we have to fork the repository of a dependency and depend on that (in general we try to upstream our changes as soon as possible).
How can we ensure that every of our developers get a consistent build environment?
We could use Mercurial subrepositories (which are similar to Git submodules and allow to "embed" specific revisions of external repositories into our repository). The disadvantage is that every developer has to build all the non-released versions of the dependencies.
We could set up an internal artifact server and build all the forked dependencies centrally.
- We could leave the version of the dependency unchanged in the forked repository. Then we have to somehow ensure that changes in the repository get picked up by all developers to have a consistent environment across all machines.
- We could give every "significant" revision in the forked repository a special version and change our project to depend on these versions. This has the disadvantage that we can't just use the branch we use to upstream our changes (since the version should be unchanged when creating a pull request).
Thoughts? Are there better ways to solve this problem?