# Make, Maven and Gradle

> What a build tool does, and how it skips work that has not changed. Make with its Makefile, Maven with pom.xml, and Gradle for Java and Android.

**Course:** [Code Editors and Package Managers](https://learn.benibix.com/learn/development-tools)  
**Time:** 13 min

**After this lesson you can:**

- Say what a build tool does
- Read a simple Makefile
- Tell Maven from Gradle

## What a build tool does, and how the big three differ

A build tool runs the steps that turn your code into a finished program. You write the steps once in a file, and the tool runs them in order: compile, test, then pack it up. Good ones skip any step whose files did not change. Make, the oldest of the best-known three, dates from 1976.

Without one, someone builds by hand, and each person builds in a slightly new way. The copy that works on one laptop fails on the server. With a build tool, each person and each server runs the very same steps.

Make is old and simple. It reads a file called a Makefile, which lists targets, the files each one needs, and the commands that make it. Make compares file dates and rebuilds only what depends on a changed file. It began with C programs, and people now use it to run all kinds of jobs.

Make has one famous trap. Each command line in a Makefile must start with a tab, not spaces. Many editors turn a tab into spaces, and Make then stops with an error about a missing separator.

Apache Maven is a build tool for Java. The whole project is described in one file, pom.xml, which also lists the packages it needs. Maven expects a fixed layout, with code in src/main/java, and runs a set list of phases such as compile, test and package. The result lands in a folder called target.

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

The common mistake is running a Gradle you put on your own machine. It may be the wrong version for the project, so use ./gradlew instead. With Maven, the mistake is fighting the layout. Put files where it looks for them, or it will not find your code.

## Three build tools side by side

| Tool | Recipe file | Mostly used for |
| --- | --- | --- |
| Make | Makefile | C programs, and any job you can script |
| Apache Maven | pom.xml | Java projects with a fixed layout |
| Gradle | build.gradle.kts | Java, Kotlin and Android apps |

## Which one you will meet

1. **Make.** When a project needs a few simple named jobs, or is written in C.
2. **Maven.** When a Java team wants one standard layout and few choices.
3. **Gradle.** When you build an Android app, or a Java project needs custom steps.

```makefile
app: main.c
	cc -o app main.c

test: app
	./app --self-test
```
Two targets. test needs app, and app needs main.c. Each command line starts with a tab.

![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)

### Example: Jack's build drops from 6 minutes to 40 seconds

Jack's Android app takes 6 minutes to build from scratch. He changes one line of one screen and builds again with ./gradlew build.

Gradle sees that only one file changed and skips the rest. The second build takes 40 seconds.

**Words in this lesson:** [Build Tool](https://learn.benibix.com/term/development/build-tool), [Make (Build Tool)](https://learn.benibix.com/term/development/make-build-tool), [Apache Maven](https://learn.benibix.com/term/development/apache-maven), [Gradle](https://learn.benibix.com/term/development/gradle)

**Question:** Why does Make say missing separator?

**Answer:** A command line starts with spaces instead of a tab. Every command line under a target must start with a tab. An editor that turns tabs into spaces causes this error.

---

Source: https://learn.benibix.com/learn/development-tools/make-maven-and-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-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
