在sbt中使用ProjectRef时如何包含传递依赖?

Iva*_*kov 6 scala sbt

我想从另一个sbt项目引用一个项目,而不创建聚合("root")项目.

我有两个依赖于某些共享代码的项目,但是它们足够独立以便将它们置于聚合("根")项目下并不真正有意义(即我永远不会同时构建这两个项目而且我希望他们在不同的git存储库中,但是我会在处理其中任何一个时更新共享代码).

我目前的解决方案如下:

lazy val core = ProjectRef(file("../Core"), "core")

lazy val console = project.in(file(".")).dependsOn(core)
Run Code Online (Sandbox Code Playgroud)

这工作直到我必须向"核心"项目添加库依赖项,现在我无法构建"控制台"项目.它失败并显示以下消息:

[error] missing or invalid dependency detected while loading class file 'Settings.class'.
[error] Could not access term typesafe in package com,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'Settings.class' was compiled against an incompatible version of com.
Run Code Online (Sandbox Code Playgroud)

它显然是指核心依赖的缺少的"com.typesafe.config"库.

有没有办法解决这个问题,以便控制台项目编译与核心的依赖?