且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

sbt 排除源目录

更新时间:2022-12-12 20:20:23

javaSourcescalaSourceunmanagedSourceDirectories 的输入.然后您可以将 unmanagedSourceDirectories 设置为 scalaSource only:

javaSource and scalaSource are inputs to unmanagedSourceDirectories. You can then set unmanagedSourceDirectories to be scalaSource only:

unmanagedSourceDirectories in Compile <<=
   scalaSource in Compile apply ( (s: File) => s :: Nil)

或更短一点:

unmanagedSourceDirectories in Compile <<= (scalaSource in Compile)( _ :: Nil)

有关详细信息,请参阅类路径、来源和资源.此外,inspect 命令对于确定设置的构建方式很有用来自其他设置.

See Classpaths, sources, and resources for details. Also, the inspect command is useful for determining how settings are built up from other settings.