Managing sbt dependencies with git submodules

Viewed 373

We're developing two packages dep and proj. The development of dep and proj happen in parrallel - i.e. particular versions of proj depend on particular versions of dep. Since manually updating the the version of dep every few commits is tedious, we were using the -SNAPSHOT mechanism (version 0.5-SNAPSHOT of proj depends on 0.4-SNAPSHOT of dep). This is far from ideal we don't have the information to build older commits of proj any more.

I've tried out sbt's RootProject but that breaks publishing proj -- the package no longer includes the dependency on dep.

Ideally, here's what I want:

  1. proj uses the source of dep directly via a git-submodule
  2. When publishing proj is able to pull dependency information from dep's project files.
  3. Development versions for dep include the git SHA that it was build from

I'd get by without 3. If 2 is difficult, I'd settle for sbt complaining loudly when the dependency specified for packaging doesn't match with the git-submodule.

In case it helps, these are the projects:

1 Answers
Related