Skip to content

Instantly share code, notes, and snippets.

@seraphr seraphr/build.sbt
Created Feb 7, 2019

What would you like to do?
sbt all command
val dockerPublish = taskKey[Unit]("ダミーのタスク。本来sbt-native-packagerのやつ")
lazy val commonSettings = Def.settings(
dockerPublish := {
import java.time.LocalTime
println(s"${} ${name.value} のpublish開始")
// 並列で実行されるのがわかりやすいように、途中sleepする
println(s"${} ${name.value} のpublish終了")
lazy val a = project
lazy val b = project
lazy val c = project
> 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
You can’t perform that action at this time.