Gradle task - pass arguments to Java application

后端 未结 7 2200
春和景丽
春和景丽 2020-12-04 14:40

I have a Java application that runs with a custom gradle task and the application requires some arguments upon being invoked. These are:

programName ( string         


        
7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-04 15:36

    If you want to use the same set of arguments all the time, the following is all you need.

    run {
        args = ["--myarg1", "--myarg2"]
    }
    

提交回复
热议问题