Gradle

{{short description|Free software build automation tool}}

{{Update|date=June 2020}}

{{Use dmy dates|date=February 2021}}

{{Infobox software

| name = Gradle

| logo = Gradle logo.svg

| logo alt = An icon of an elephant, next to the word 'Gradle'

| developer = Hans Dockter, Adam Murdoch, Szczepan Faber, Peter Niederwieser, Luke Daley, Rene Gröschke, Daz DeBoer

| released = {{Start date and age|df=yes|2008|4|21}}

| latest release version = {{wikidata|property|edit|reference|P548=Q2804309|P348}}

| latest release date = {{start date and age|{{wikidata|qualifier|P548=Q2804309|P348|P577}}}}

| latest preview version = 8.14 RC3

| latest preview date = {{Start date and age|df=yes|2025|04|23}}

| programming language = Java, Groovy, Kotlin

| genre = Build tool

| license = Apache License 2.0

| website = {{URL|https://gradle.org/}}

}}

Gradle is a build automation tool for multi-language software development. It manages tasks like compilation, packaging, testing, deployment, and publishing. Supported languages include Java (as well as JDK-based languages Kotlin, Groovy, Scala), C/C++, and JavaScript.{{Cite web|title=Gradle User Manual|url=https://docs.gradle.org/current/userguide/userguide.html|access-date=2020-11-14|website=docs.gradle.org}}

Gradle builds on the concepts of Apache Ant and Apache Maven, and introduces a Groovy- and Kotlin-based domain-specific language contrasted with the XML-based project configuration used by Maven.{{cite web|url=https://www.petrikainulainen.net/getting-started-with-gradle|title=Getting Started With Gradle|work=Petri Kainulainen|access-date=26 March 2016}} Gradle uses a directed acyclic graph to provide dependency management. The graph is used to determine the order in which tasks should be executed. Gradle runs on the Java Virtual Machine.{{Cite web|url=https://docs.gradle.org/current/userguide/userguide.html|title = What is Gradle?}}

Gradle was designed for multi-project builds, which can grow to be large. It operates based on a series of build tasks that can run serially or in parallel. Incremental builds are supported by determining the parts of the build tree that are already up to date; any task dependent only on those parts does not need to be re-executed. It also supports caching of build components, potentially across a shared network using the Gradle Build Cache. Combined with the proprietary hosted service of Develocity, it produces web-based build visualizations called Gradle Build Scans. The software is extensible for new features and programming languages with a plugin subsystem.

Gradle is distributed as Free Software under the Apache License 2.0, and was first released in 2008.{{Cite web|title=Our Story|url=https://gradle.com/our-story/|access-date=2021-10-15|website=Gradle Enterprise|language=en-US}}

History

= Origin of the name =

Founder and CEO Hans Dockter has said that he originally wanted to name the project "Cradle". However, to make the name unique and less "diminutive" he instead chose "Gradle", taking the "G" from the use of Groovy.{{Cite web |date=2011-12-20 |title=Why is gradle called gradle? |url=https://discuss.gradle.org/t/why-is-gradle-called-gradle/3226 |access-date=2022-06-30 |website=Gradle Forums |language=en}}

= Major versions =

class="wikitable"

|+

!Version

!Date

0.1

|21 April 2008{{Cite web|date=2008-05-12|title=Index of /gradle|url=http://dist.codehaus.org/gradle/|access-date=2021-10-15|archive-url=https://web.archive.org/web/20080512040613/http://dist.codehaus.org/gradle/|archive-date=12 May 2008}}

1.0

|12 June 2012{{Cite web|title=Gradle {{!}} Releases|url=https://gradle.org/releases/|access-date=2021-10-15|website=Gradle|language=en-US}}

2.0

|1 July 2014

3.0

|15 August 2016

4.0

|14 June 2017

5.0

|26 November 2018

6.0

|8 November 2019

7.0

|9 April 2021

8.0

|13 February 2023

Features

Gradle offers support for all phases of a build process including compilation, verification, dependency resolving, test execution, source code generation, packaging and publishing.

Because Gradle follows a convention over configuration approach, it is possible to describe all of these build phases in short configuration files.

Conventions include the folder structure of the project, standard tasks and their order as well as dependency repositories. However, all conventions can be overridden by the project configuration if necessary. {{Cite web|date=2023-06-24|title=Building Java & JVM projects|url=https://docs.gradle.org/current/userguide/building_java_projects.html|access-date=2023-06-24}}

Plugins are a central component of Gradle. They allow for integration of a set of configurations and tasks into a project and can be included from a central plugin repository or custom-developed for a single project.

Distribution

Gradle is available as a separate download, but can also be found bundled in products such as Android Studio. Gradle Wrapper is the recommended way to invoke Gradle. It can download the declared version of Gradle beforehand if necessary. {{cite web |title=Gradle Wrapper Reference |url=https://docs.gradle.org/current/userguide/gradle_wrapper.html |website=Gradle User Manual |access-date=4 March 2024}}

See also

{{Portal|Computer programming|Free and open-source software}}

References

{{Reflist}}

Further reading

{{refbegin}}

  • {{cite book

|ref= none

|last1= Berglund

|first1= Tim

|last2= McCullough

|first2= Matthew

|others= Foreword by Hans Dockter

|title= Building and Testing with Gradle

|url= http://oreilly.com/catalog/0636920019909/

|edition= First

|date= July 2011

|publisher= O'Reilly Media

|isbn= 978-1-4493-0463-8

|page= 116

}}

  • {{cite book

|ref= none

|last1= Berglund

|first1= Tim

|title= Gradle Beyond the Basics

|url= http://shop.oreilly.com/product/0636920019923.do

|edition= First

|date= August 2013

|publisher= O'Reilly Media

|isbn= 978-1-449-30467-6

|page= 69

}}

  • {{cite book

|ref= none

|last1= Ikkink

|first1= Hubert

|title= Gradle Effective Implementation Guide

|url= http://www.packtpub.com/gradle-effective-implementation-guide/book

|edition= First

|date= November 2012

|publisher= Packt Publishing

|isbn= 978-1849518109

|page= 382

|archive-date= 2 August 2014

|access-date= 6 November 2012

|archive-url= https://web.archive.org/web/20140802114731/http://www.packtpub.com/gradle-effective-implementation-guide/book

|url-status= dead

}}

  • {{cite book

|ref= none

|last1= Berglund

|first1= Tim

|last2= McCullough

|first2= Matthew

|title= Gradle DSLs

|url= http://oreilly.com/catalog/0636920019923/

|edition= First

|date= May 2013

|publisher= O'Reilly Media

|isbn= 978-1-4493-0467-6

|pages= 50 est

}}

  • {{cite book |ref=none

|last1= Muschko

|first1= Benjamin

|title= Gradle in Action

|edition= First

|date= Fall 2013

|publisher= Manning Publications

|isbn= 9781617291302

|page= 390

}}

{{refend}}