title: Jenkins Gradle Plugin - Pass parameters as -P instead of -D
body: <p>OK</p>
  
  <p>I have a Jenkins job (Jenkins version more recent).</p>
  
  <p>In my Jenkins job, I have couple of parameters (string type).</p>
  
  <p>Ex: param<strong>1</strong>=value<strong>1</strong> ... to param<strong>N</strong>=value<strong>N</strong></p>
  
  <p>Now, in Jenkins job, under <strong>BUILD</strong> section, I'm calling "<strong>Invoke Gradle"</strong>.</p>
  
  <p>In this Gradle section, I'm calling a task(s). For ex: <em>clean build</em></p>
  
  <p>What I need is: I want to pass the above Jenkins job's parameters to Gradle as -PparamN=ValueN way?</p>
  
  <p>But when I'm passing -Pparam1=${param1} -Pparam2=${param2} ...and so on in "<em>Switches</em>" option in Gradle Build section, I see Jenkins log is showing:</p>
  
  <p>It called Gradle exectuable successfully with the parameters.</p>
  
  <pre><code>...somepath.../bin/gradle -Dparam1=value1 -Dparam2=value2 ... -DparamN=valueN -Pparam1=value1 -Pparam2=value2 ... -PparamN=valueN
  </code></pre>
  
  <p>This tell, Jenkins is kind enough to pass the parameters(which I have defined in the job) to Gradle as "-D" way for free. </p>
  
  <p>My ?s:</p>
  
  <ol>
  <li>Well, I don't want to pass the above parameters as -Dxxx=yyy</li>
  <li>I want to pass the parameters only -Pxxx=yyy way</li>
  <li>Is this possible with using "Invoke Gradle" plugin?</li>
  </ol>