[英]Referring to a setting in an sbt root project from a sub project
如何從多項目sbt構建中的baseDirectory
中引用根項目的baseDirectory? 喜歡
lazy val full: Project = Project(
id = "full",
base = file("."),
..
)
lazy val sub = Project(
id = "sub",
base = file("sub"),
..
settings = Seq(
javaSource in Compile := full.settings.baseDirectory / "foo" / "src"
)
)
這個嘗試只是給了我:
: error: ambiguous reference to overloaded definition,
both method settings in trait Project of type (ss: sbt.Def.Setting[_]*)sbt.Project
and method settings in trait ProjectDefinition of type => Seq[sbt.Def.Setting[_]]
match expected type ?
javaSource in Compile := full.settings.baseDirectory / "foo" / "src",
^
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.