Create a new task that runs a program

前端 未结 2 605
梦如初夏
梦如初夏 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:15

    well you can give it a try .. I works fine for me -

    lazy val testngRun = inputKey[Unit]("custom run task for testng")
    
    testngRun := {
        val one = (runMain in Compile).fullInput(" org.testng.TestNG -testclass com.pg.acceptance.testcase.PfsLoginServiceTest").evaluated
    }
    

提交回复
热议问题