Disable aggregate for sbt custom task

 ̄綄美尐妖づ 提交于 2019-12-24 12:36:21

问题


How can I disable aggregate for a single custom task?

I tried to add the following to my build.sbt:

aggregate in myTaskName:= false

But it doesn't work as I expected - I've got this error:

~\build.sbt:1: error: not found: value myTaskName
aggregate in myTaskName:= false 

回答1:


Working example (sbt 0.13.5):

val hello = TaskKey[Unit]("hello", "Prints 'Hello Zhu'")

val helloTask = hello := {
  println("Hello Zhu")
}

aggregate in hello := false

Note, that TaskKey was used - not the Setting[Task] itself. It worth additional notice that this key should be accessable from your build.sbt and, as @Mark Harrah mentioned, hello must be fully-qualified.



来源:https://stackoverflow.com/questions/14323038/disable-aggregate-for-sbt-custom-task

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!