gpt4 book ai didi

scala - 如何依赖 Github 的多模块 SBT 项目的子项目

转载 作者:行者123 更新时间:2023-12-01 23:30:46 26 4
gpt4 key购买 nike

我可以像这样添加对 commons 根的依赖:

lazy val commons = RootProject(uri("ssh://git@github.com:foo/commons.git"))
lazy val thisProject = project.in(file(".")).dependsOn(commons)

但是如果我想依赖一个特定的 commons 子项目怎么办(commons 存储库包含一个多模块 SBT 项目)。例如。 (伪代码):

lazy val commonDbStuff = RootProject(uri("ssh://git@github.com:foo/commons.git")).sub("commons-db") // pseudo-code
lazy val thisProject = project.in(file(".")).dependsOn(commonsDbStuff)

这可能吗?

最佳答案

lazy val commonDbStuff = 
ProjectRef(uri("ssh://git@github.com/foo/commons.git"), "commons-db")

关于scala - 如何依赖 Github 的多模块 SBT 项目的子项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37295396/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com