Jenkins job using Gradle can't find executable

Finally figured it out. I needed to update my jenkins job to use the Gradle wrapper instead of a specific Gradle version. Once I did that I had a few more errors to sift through but they were all very informative and gave me the information I needed to resolve them.


I downloaded the Gradle. Extracted to some place.

In Jenins > Manage Jenkins > Gradle

Unchecked the install automatic.

Set the path to gradle home, (Ex: C:\Graddle\gradle-2.1).

Probelm resolved.


For Jenkins running on linux:

  1. download gradle zip file

    cd /opt/

    wget https://services.gradle.org/distributions/gradle-2.10-all.zip

  2. unzip

    unzip gradle-2.10-all.zip

  3. visit jenkins website

    Jenkins > Manage Jenkins > Configure System > Gradle > Gradle installations

    uncheck Install automatically, set 2.10 to name, set /opt/gradle-2.10 to GRADLE_HOME.

  4. click your job

    Configure > Build > Invoke Gradle script

    select Invoke Gradle, select 2.10 in Gradle Version dropdown list.