Build Gradle from the source
Get the sources
Either download the source distribution or check out Gradle from svn.Execute the Build
We use Gradle to build Gradle. But Gradle does not need to be installed on your machine to build it. Svn and the source distribution contain a Gradle binary distribution capable of building Gradle. With the Gradle wrapper you can build Gradle via this internal Gradle distribution. Just go to the top level directory of the svn checkout or the Gradle source distribution and type:Windows:
gradlew clean dists
*nix:
./gradlew clean dists
In the build/distributions folder you can find the generated Gradle distributions.
To learn more about the Gradle wrapper and how you can use it for your own projects build with Gradle have a look at chapter 16 in the user's guide.
Installing Gradle with the Build
The Gradle build has an install task:
./gradlew clean install
The install task deletes any existing Gradle distribution at the specified destination. You need to specify the install destinaton with two project properties:
| Property | Meaning |
| gradle_installDir | The parent directory of the top level directory of the Gradle distribution. (For Windows users: Please use '/' as a file separator). |
| gradle_installDirName | The name of the top level directory of the Gradle distribution. |
You can set this properties in the gradle.properties file of your Gradle home directory (usually USER_HOME/.gradle).
For how to set project properties you may see also section 4.4 of the user's guide.
PLEASE NOTE: The install functionality is a new feature not available in this form for the gradle-0.2 source distribution.
