title: Jenkins: gradle is not being recognized during build
body: <p>I already installed grade and set up in the environment variable <strong>PATH</strong></p>
  
  <p>even I am getting an error.</p>
  
  <p><strong>gradle.bat is not recognized as an internal or external command in Jenkins</strong></p>
  
  <p>the configuration is </p>
  
  <p><a href="https://i.stack.imgur.com/4WYDy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4WYDy.png" alt="enter image description here"></a></p>
  
  <p>and the workspace is like <a href="https://i.stack.imgur.com/CPXRh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CPXRh.png" alt="enter image description here"></a></p>
  
  <p>and the default task is in build.gradle is </p>
  
  <pre><code>task build{
    dependsOn copyDocsSetup
  }
  </code></pre>
  
  <p>while I am building using Jenkin I am getting an error like the below</p>
  
  <pre><code>Started by user ajay
  Building in workspace C:\Program Files (x86)\Jenkins\workspace\ARS BUILD
  [Gradle] - Launching build.
  [ARS BUILD] $ cmd.exe /C "gradle.bat -b '"C:\Program Files (x86)\Jenkins\workspace\ARS BUILD\gradleBuildScript\BuildARSSystem\ARSBuild\build.gradle"' &amp;&amp; exit %%ERRORLEVEL%%"
  'gradle.bat' is not recognized as an internal or external command,
  operable program or batch file.
  Build step 'Invoke Gradle script' changed build result to FAILURE
  Build step 'Invoke Gradle script' marked build as failure
  Finished: FAILURE
  </code></pre>
  
  <p>how to solve it, I am very new in Jenkins world.
  thanks in advance.</p>