Gradle
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. The reference material consulted while preparing these pages is listed in the section bibliography. |
Gradle is a JVM build tool with a programmable task graph and variant-aware dependency management. A build
is described by a settings script and one build script per project, written in the Kotlin DSL (build.gradle.kts) or the
Groovy DSL (build.gradle). Plugins contribute conventions and tasks, each task declares its inputs and outputs, and Gradle uses
that information to skip work that is up to date, to reuse results from a build cache and to run independent tasks in parallel.
The Gradle Wrapper (gradlew) pins the Gradle version a project uses, so the tool does not need to be installed first.
Gradle sits between the other two tools: it has conventions like Maven (through plugins such as java-library) and the freedom
of a real programming language like Ant. The price is a larger model to learn, which these pages introduce in layers. The
comparison with Ant and Maven is on
Comparing Ant, Maven & Gradle.
Who the documentation is for
Gradle’s own getting-started material is organised around three personas, and the pages here can be read the same way:
-
The software engineer who builds and tests a project: the command line, tasks, the Java plugins and dependencies. See Gradle for software engineers.
-
The build engineer who maintains the build: convention plugins, multi-project and composite builds, version catalogs, caching and performance. See Gradle for build engineers.
-
The plugin developer who writes custom tasks and plugins: the lazy model, the Worker API and build services. See Gradle for plugin developers.
Release baseline
The pages in this subsection are written against these releases, checked on 2026-10-16, and every example marked as run was executed on JDK 26:
| Release | Status | Notes |
|---|---|---|
Gradle 9.8.1 |
Current (October 2026) |
Needs JVM 17 or later to run. Examples are shown in the Kotlin DSL first and the Groovy DSL second. |
Gradle 8.14.6 |
Last 8.x release |
Noted where it differs from 9. |
The compatibility matrix for Java, Kotlin, Groovy and Android, the feature lifecycle and the end-of-life policy are on Versions, Compatibility & Release History and in the release list.
Gradle and Develocity
Gradle is the open-source build tool. Develocity is a separate, commercial product from the same company that adds build analytics, remote build caching and test insights on top of it. A Build Scan, published by the Develocity plugin, is the entry point most developers meet. Everything in this subsection works without Develocity; where a page mentions it, the page says so. The product is described on gradle.com, and Performance Profiling & Build Scans shows what it adds.
Recommended reading path
-
Build Automation Fundamentals for the vocabulary shared by all three tools.
-
Core Concepts, Installation and Gradle Wrapper to get a working setup.
-
Command-Line Interface and Build Lifecycle to run a build and understand its three phases.
-
Settings & Build Scripts, Kotlin DSL and Tasks to write a first build.
-
Java Projects, Declaring Dependencies & Configurations and Testing JVM Projects for a complete library build.
-
Version Catalogs, Multi Project Builds and Convention Plugins & Sharing Build Logic to scale up.
-
Build Cache, Configuration Cache & Isolated Projects and Publishing for speed and shipping.
-
Lazy Configuration & Providers and Writing Custom Tasks if you write plugins.
-
Migrating from Maven and Upgrading Gradle when moving an existing project.