title: How to pass multiple parameters in command line when running gradle task?
body: <p>I've got a java and groovy classes that are being run by gradle task. I have managed to make it work but I do not like the way I have to pass the parameters in command line. Here is how I do it currently via command line: <code>gradle runTask -Pmode"['doStuff','username','password']"</code><br>
  my build.gradle code which takes these parameters looks like this:         </p>
  
  <pre><code>if (project.hasProperty("mode")) {
  args Eval.me(mode)}
  </code></pre>
  
  <p>and then I use my arguments/parameters in my java code as follows: </p>
  
  <pre><code>String action = args[0]; //"doStuff"
  String name = args[1]; .. //"username"
  </code></pre>
  
  <p>I was wondering is there a way to pass the parameters in a better way such as: </p>
  
  <pre><code>gradle runTask -Pmode=doStuff -Puser=username -Ppass=password 
  </code></pre>
  
  <p>and how to use them in my java classes.</p>