Gradle task - pass arguments to Java application

后端 未结 7 2181
春和景丽
春和景丽 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:22

    You can find the solution in Problems passing system properties and parameters when running Java class via Gradle . Both involve the use of the args property

    Also you should read the difference between passing with -D or with -P that is explained in the Gradle documentation

提交回复
热议问题