我尝试使用
将另一个源目录添加到 play 项目中def temporarySources = Def.setting { (baseDirectory in Compile).value / "temporary" }
然后添加到设置
(unmanagedSources in Compile) += temporarySources.value
运行sbt test
后,sbt抱怨,该目录不存在,虽然我确定它在那里(我可以cd到目录)
答案 0 :(得分:3)
我猜你需要unmanagedSourceDirectories
而不是unmanagedSources
,请尝试以下设置:
unmanagedSourceDirectories in Compile += (baseDirectory.value / "temporary"),
unmanagedSourceDirectories in Test += (baseDirectory.value / "temporary")