[英]Trying to run a scala script, conscript errors when install “sbt/sbt”
[英]Can we run scala script when we execute sbt commands?
每當我們使用“sbt compile”或“sbt assembly”之類的sbt命令時,我想運行一個腳本。
反正有沒有實現這個目標?
對任務添加步驟的操作類似於以下內容:
compile <<= (compile in Compile) map {result =>
// whatever you want to do after compile here.
result
}
如果要定義運行腳本的自定義Command
,請在構建中定義類似的命令
def myCommand = Command.command("myCommand") { state =>
s"<relative path to script here>" !; state
}
然后,您可以將myCommand
添加到您希望myCommand
運行的每個任務中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.