# Gradle

> A free build tool for Java, Kotlin and Android. Its recipe file is code.

**Field:** Software Development  
**Category:** Editors & Tools  
**Also known as:** Gradle Build Tool, gradlew, build.gradle

## Think of it like

It is like a recipe card you can add your own steps to.

## Definition

Gradle is a free build tool used most for Java, Kotlin and Android apps. The steps live in a file called build.gradle.kts, written in Kotlin, or build.gradle, written in Groovy. Because the file is code, you can add your own steps. It skips work that has not changed, so later builds are fast. Projects ship a small script called gradlew that fetches the right Gradle version.

## Example

Jack builds an Android app. He types ./gradlew build, and Gradle compiles the app, runs the tests and makes the app file.

## Example code

```console
$ ./gradlew build
BUILD SUCCESSFUL
```

The gradlew script fetches the right Gradle, then builds and tests the project.

## Why it matters

Android apps are built with it. If you build for Android, you work with Gradle every day.

## Common mistake

Running a gradle you put on your computer yourself. Use ./gradlew, since the project may need its own version.

## Three principles

- **Code as recipe.** The build file is Kotlin or Groovy.
- **Skip done work.** Unchanged steps are not run again.
- **Use the wrapper.** gradlew picks the right version.

## Related terms

- [Build Tool](https://learn.benibix.com/term/development/build-tool)
- [Apache Maven](https://learn.benibix.com/term/development/apache-maven)
- [Kotlin](https://learn.benibix.com/term/development/kotlin)
- [Java](https://learn.benibix.com/term/development/java)
- [Android](https://learn.benibix.com/term/development/android)

## Told apart from

- [Maven vs Gradle](https://learn.benibix.com/compare/maven-vs-gradle): People think Gradle is just Maven with a new file, and it is not. Maven describes a project in pom.xml and runs a fixed list of steps. A Gradle build file is code, in Kotlin or Groovy, so you can add steps of your own. Gradle also skips work that has not changed. Both can fetch packages from Maven Central.

## Taught in

- [Make, Maven and Gradle](https://learn.benibix.com/learn/development-tools/make-maven-and-gradle): Coding Tools, 12/13

![Source files on the left go into a build tool in the middle, which reads a recipe file: a Makefile, a pom.xml or a build.gradle.kts. Inside the tool, three steps run in order: compile, test, package. On the right comes the result, a program or a jar file. Below, a task runner row shows npm run build running the real command behind it, vite build.](https://learn.benibix.com/diagrams/dev5-build-tool.svg)

---

Source: https://learn.benibix.com/term/development/gradle
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
