Pass parameters to java main method using graddle

To pass for example a param “-a” with value “” to the static void main method that tha graddle task will run,  you will need to :

  • add following entry to file, or assert that it is already there:
    run {
        if (project.hasProperty("appArgs")) {
            args =
  • run graddle on the following form:
    gradle  run  -PappArgs="['-a',  '']"