Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何禁用单个自定义任务的聚合?
我尝试将以下内容添加到我的build.sbt:
build.sbt
aggregate in myTaskName:= false
但它不像我预期的那样工作 - 我有这个错误:
~\build.sbt:1: error: not found: value myTaskName aggregate in myTaskName:= false
工作示例(sbt 0.13.5):
val hello = TaskKey[Unit]("hello", "Prints 'Hello Zhu'") val helloTask = hello := { println("Hello Zhu") } aggregate in hello := false
请注意,这TaskKey是使用的 - 而不是Setting[Task]本身。值得额外注意的是,您应该可以访问此密钥,build.sbt并且正如@Mark Harrah 所提到的,hello它必须是完全合格的。
TaskKey
Setting[Task]
hello