Create a new task that runs a program

前端 未结 2 598
梦如初夏
梦如初夏 2021-01-12 04:06

I need to define a custom tasks that computes the name of a main class and then runs it. I was thinking about something like this

customTask {
  mainClass =          


        
2条回答
  •  醉梦人生
    2021-01-12 04:19

    Late answer but you can create new SBT tasks as mentioned in documentation http://www.scala-sbt.org/release/docs/Detailed-Topics/Tasks#defining-a-new-task

    You can run any scala code as the task code. Tasks can also take input arguments.

    Pretty much powerful IMO.

提交回复
热议问题