- sbt/sbt#628
- https://github.com/sbt/sbt/commit/d38450b41f4fb9a2652a854185e6e2d1a7d5efad
- https://www.scala-sbt.org/0.13/docs/ChangeSummary_0.13.0.html
- Added all command which can run more than tasks in parallel.
- 把握している限りでは、all commandについては、このリリースノートにしか書かれていない
Created
February 7, 2019 08:04
-
-
Save seraphr/741ee0316381a5a35c6d488222217801 to your computer and use it in GitHub Desktop.
sbt all command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val dockerPublish = taskKey[Unit]("ダミーのタスク。本来sbt-native-packagerのやつ") | |
lazy val commonSettings = Def.settings( | |
dockerPublish := { | |
import java.time.LocalTime | |
println(s"${LocalTime.now()} ${name.value} のpublish開始") | |
// 並列で実行されるのがわかりやすいように、途中sleepする | |
Thread.sleep(3000) | |
println(s"${LocalTime.now()} ${name.value} のpublish終了") | |
} | |
) | |
lazy val a = project | |
.settings( | |
commonSettings | |
) | |
lazy val b = project | |
.settings( | |
commonSettings | |
) | |
lazy val c = project | |
.settings( | |
commonSettings | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> all a/dockerPublish b/dockerPublish | |
16:42:10.772 a のpublish開始 | |
16:42:10.772 b のpublish開始 | |
16:42:13.774 a のpublish終了 | |
16:42:13.775 b のpublish終了 | |
[success] Total time: 3 s, completed 2019/02/07 16:42:13 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment