Adaptable, fast automation for all

License: Apache-2.0

Language: Groovy

Keywords: build-tool, gradle

Gradle Logo

Gradle is a build tool with a focus on build automation and support for multi-language development. If you are building, testing, publishing, and deploying software on any platform, Gradle offers a flexible model that can support the entire development lifecycle from compiling and packaging code to publishing web sites. Gradle has been designed to support build automation across multiple languages and platforms including Java, Scala, Android, C/C++, and Groovy, and is closely integrated with development tools and continuous integration servers including Eclipse, IntelliJ, and Jenkins.

For more information about Gradle, please visit:


You can download released versions and nightly build artifacts from:


Naturally, Gradle builds itself with Gradle. Gradle provides an innovative wrapper that allows you to work with a Gradle build without having to manually install Gradle. The wrapper is a batch script on Windows and a shell script on other operating systems.

You should use the wrapper to build the gradle project. Generally, you should use the wrapper for any wrapper-enabled project because it guarantees building with the Gradle version that the build was intended to use.

To build the entire Gradle project, you should run the following in the root of the checkout.

./gradlew build

This will compile all the code, generate all the documentation and run all the tests. It can take several hours because we have thousands of tests, including integration tests that exercise virtually every Gradle feature. Among the things we test are: compatibility across versions, validity of samples and Javadoc snippets, daemon process capabilities, etc.

In order to for this build to pass, you will need a supported native tool chain installed. See the Gradle userguide for a list of supported tool chains.

Installing from source

To create an install from the source tree you can run either of the following:

./gradlew install -Pgradle_installPath=/usr/local/gradle-source-build

This will create a minimal installation; just what's needed to run Gradle (i.e. no docs). Note that the -Pgradle_installPath denotes where to install to.

You can then build a Gradle based project with this installation:

/usr/local/gradle-source-build/bin/gradle «some task»

To create a full installation (includes docs):

./gradlew installAll -Pgradle_installPath=/usr/local/gradle-source-build

Working with subprojects

The Gradle build uses Gradle's ability to customize the logical structure of a multiproject build. All of the build's subprojects are in the subprojects/ directory and are mapped to top level children in settings.gradle.

This means that to build just the core subproject (that lives in subprojects/core) you would run:

./gradlew core:build

Or to build the docs:

./gradlew docs:build

And so on.


If you're looking to contribute to Gradle or provide a patch/pull request, you can find info on how to get in touch with the developers at

Contributing Code

This is a complicated topic and the Gradle development team are happy to help anybody get started working with the Gradle code base, so don't hesitate to get in touch with the developers if you need help working with the finer points of the build.

If you are simply wanting to fix something or adding a small minor feature, it is usually good enough to simply make your change to the code and then run the check task for that subproject. So if the patch was to the launcher package for example, you can run:

./gradlew launcher:check

To run all of the tests and code quality checks for that module.

Contributing Documentation

Please see the readme in the docs subproject.

Opening in your IDE

IntelliJ IDEA

To open the Gradle project in IDEA, simply run the following task from the root:

./gradlew idea

This will generate appropriate IDEA metadata so that the project can be opened from within IDEA. Also, IntelliJ Run Configurations will be generated, which allow you to run/debug Gradle or run pre-commit tests.

Note that due to an IDEA glitch, the first build of Gradle from IDEA will fail. Launching a second build fixes the compilation error.


Gradle Integration for Eclipse (by Pivotal)

The Gradle project is not currently buildable in Eclipse. This is something that will be rectified in the future.

You can try running:

./gradlew eclipse

This command generates Eclipse metadata that allows importing the project into Eclipse. However, you will have to do some manual fixes to the project's setup to make it work.

Gradle for Eclipse (by Nodeclipse/Enide)

With Gradle(Enide) Eclipse plugin, you can import as general plugin or prepare before with ./gradlew eclipse.

Build is run via right-click on build.gradle Run As -> gradle build Gradle Build

Project Statistics

Sourcerank 10
Repository Size 284 MB
Stars 9,860
Forks 2,896
Watchers 486
Open issues 2,120
Dependencies 0
Contributors 207
Tags 1,045
Last updated
Last pushed

Top Contributors See all

Adam Murdoch Luke Daley Daz DeBoer Szczepan Faber Rene Groeschke Peter Niederwieser Hans Dockter Cédric Champeau Sterling Greene Benjamin Muschko Lóránt Pintér Lari Hotari Gary Hale Marcin Erdmann Adrian Kelly Etienne Studer Radim Kubacki Fredrik Ekholdt Mark Vieira Rodrigo B. de Oliveira

Recent Tags See all

v4.6.0 February 28, 2018
v4.6.0-RC2 February 21, 2018
v4.6.0-RC1 February 16, 2018
v4.5.1 February 04, 2018
v4.5.0-RC2 January 20, 2018
v4.5.0-RC1 January 08, 2018
v4.5.0 December 22, 2017
v4.4.1 December 20, 2017
v4.4.0 December 06, 2017
v4.4.0-RC6 December 01, 2017
REL_4.4-rc-6 December 01, 2017
REL_4.4 December 01, 2017
v4.4.0-RC5 November 30, 2017
REL_4.4-rc-5 November 30, 2017
v4.4.0-RC4 November 28, 2017

Interesting Forks See all

The project for translating the gradle documents into Japanese
Java - Last pushed - 24 stars - 2 forks
A powerful build system for the JVM
Java - Last pushed - 5 stars - 1 forks
A powerful build system for the JVM
Java - Other - Last pushed - 2 stars
A powerful build system for the JVM
Java - Updated - 2 stars
A powerful build system for the JVM
Java - Last pushed - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2017-11-24 18:52:49 UTC

Login to resync this repository