The installation instructions for Gradle on their site at http://www.gradle.org/installation is okay for a beginner, but could be better. If you followed the very simple instructions on their site, then you may have run into some trouble and would have to do some searching on the internet to find out why you weren't getting anything from typing
gradle -v into the command prompt. Here are the full steps to get Gradle working without worries!
Difficulty - Beginners
It'll be a piece of cake. This cake is no lie.
- Windows 8 (or any Windows version)
- Java JDK installed
- Download Gradle at their site: http://www.gradle.org/downloads.
- Unzip the package to anywhere you want to keep it. I normally put these kinds of things in my development directory where other goodies go into also.
- Now, right click on "Computer" (a.k.a. "My Computer") and then select "Properties":
- Then click on "Advance system settings":
- Now, you should already be on the "Advanced" tab, so click on "Environment Variables...":
- Then we want to add a new user variable for us called
JAVA_HOME. Click on "New..." as shown below:
- Now enter
JAVA_HOMEinto the input field for "Variable name:":
- For "Variable value:", we want to enter the location of your Java JDK directory. The Java JDK on my computer is located in it's default installation location,
- When finished, click "OK".
- Under "System variables", look for the "Variable" called Path
- Now we want to add additional paths to our PATH environment variable, so let's click on "Edit..." under "System variables" as shown below:
- Then proceed to the end of the value and enter the
\binlocations of both Gradle and the Java JDK.
- For Gradle, I entered it as
C:\gradle-2.1\bin. For the Java JDK, enter only
%JAVA_HOME%will use the user variable we defined earlier to get your Java JDK directory for you.
- After you're done entering the new bin paths for Gradle and the Java JDK, click "OK". Click "OK" a couple more times to back out.
- Now, let's test it out. Open up command prompt and type
gradle -vand you should see something similar: