SBT “package” depend on “test”

前端 未结 1 1428
轮回少年
轮回少年 2021-01-25 06:15

How do I make target \"package\" depend on target \"test\" ?

There is a solution here: Force sbt 0.11 to run tests But it doesn\'t really work with the xsbt-web-plugin.<

相关标签:
1条回答
  • 2021-01-25 06:51

    Here's what I did:

    Keys.`package` <<= (test in Test, Keys.`package` in Compile) map { (_, in) =>
      println("after package & test")
      in
    }
    

    It runs test, and iff the tests were successful, runs package task. (tested on fresh install of lift-2.5-RC2)

    0 讨论(0)
提交回复
热议问题