Features
What Gradle can do, grouped by how you use it. For the details, see the User Manual.
For Developers
Faster, easier builds for anyone who runs Gradle.
Faster Builds
-
Incremental Builds
Gradle skips any task whose inputs, outputs, and implementation haven't changed since the last build, so you only wait for what actually changed.
Documentation for Incremental Builds -
Build Caching
Reuse task outputs that a teammate or CI already built (with a remote cache), so you don't repeat work someone else has already done.
Documentation for Build Caching -
Incremental Tasks
Custom tasks can process only the files that changed instead of everything, so your own build logic stays fast as the project grows.
Documentation for Incremental Tasks -
Incremental Annotation Processing
Annotation processors that support it, such as Dagger and Room, trigger recompiling only what changed, so using them no longer costs you a full compile on every edit.
Documentation for Incremental Annotation Processing -
Compiler Daemon
Run Java compilation in its own reusable process so large builds spend less time in garbage collection, which helps most when one task compiles thousands of files.
Documentation for Compiler Daemon -
Parallel Execution
Run tasks from different subprojects (and Worker API task work) at the same time with
Documentation for Parallel Execution--parallel, so multi-project builds use all your CPU cores. -
Skip Redundant Downloads
Gradle reuses cached dependencies and skips any download whose checksum already matches, so clean and CI builds spend less time on the network.
Documentation for Skip Redundant Downloads -
Task Timeouts
Set a timeout on a task so a hung one fails the build instead of stalling it or tying up a CI agent forever.
Documentation for Task Timeouts
Build Scans
Run any build with --scan to publish a free Build Scan®, a shareable link to the build's tasks, tests, dependencies and performance that you can send instead of pasting logs.
-
Performance Breakdown
See exactly where your build time goes, by script, plugin, dependency resolution, and task, so you know what to fix first.
Documentation for Performance Breakdown -
Cacheability Insights
Find out which tasks aren't cacheable and why, so you can unlock faster builds from the Build Cache.
Documentation for Cacheability Insights -
Dependency Insights
Search every resolved dependency across all projects, including dynamic-version resolutions, to track down version conflicts quickly.
Documentation for Dependency Insights -
Test Results
See every test's outcome and duration, including retries, so you can spot slow and flaky tests without digging through logs.
Documentation for Test Results -
Deprecation Reports
Find the deprecated Gradle features your build and plugins use and fix them before they break your next Gradle upgrade.
Documentation for Deprecation Reports -
Collaborative Debugging
Send a colleague a link to the exact console lines or Build Scan detail instead of pasting logs and screenshots, so problems get solved faster.
Documentation for Collaborative Debugging -
Extend and Customize
Add your own tags, values, and links to every scan so you can find the builds that matter to your team.
Documentation for Extend and Customize
Develocity collects Build Scans from your local and CI builds so your team can compare builds, track trends, and use that data as the context engineering layer for AI-driven software delivery.
Command-Line Control
-
Continuous build
Gradle reruns your tasks automatically whenever inputs change, so you get instant feedback without retyping commands.
Documentation for Continuous build -
Composite builds
Develop an app and the library it depends on side by side without publishing in between, so changes show up immediately.
Documentation for Composite builds -
Task Exclusion
Skip a task, and the dependencies only it needs, from the command line with
Documentation for Task Exclusion-xwhen you don't need it for the job at hand. -
Dry Run
Preview which tasks would run without running them, so you can check a build before paying for it.
Documentation for Dry Run -
Continue Execution After Failures
Use
Documentation for Continue Execution After Failures--continueto keep running every task that doesn't depend on a failure and see all independent failures at the end, instead of fixing one error per run. -
Fail Fast Test execution
Stop at the first failing test with
Documentation for Fail Fast Test execution--fail-fastso you don't wait for the whole suite when you already know something is broken. -
Refresh Dependencies
Re-check dynamic and changing dependencies against your repositories with
Documentation for Refresh Dependencies--refresh-dependencies, re-downloading only what actually changed, so you never need to delete the cache by hand.
For Build Authors
For the people who write and maintain builds and are responsible for developer productivity.
Writing Build Scripts
-
Groovy DSL
Write concise, readable build scripts that look like configuration while still giving you a full programming language when you need it.
Documentation for Groovy DSL -
Kotlin DSL
Get IDE code completion, navigation, refactoring and inline docs in your build scripts, so you spot typos and wrong types while editing.
Documentation for Kotlin DSL -
Gradle Init Plugin
Start a new project or convert an existing Maven build to Gradle with a single command.
Documentation for Gradle Init Plugin
Declaring Dependencies and Repositories
-
Transitive Dependencies
Declare what you use and let Gradle fetch and manage everything it needs, so you don't track libraries of libraries by hand.
Documentation for Transitive Dependencies -
Custom Dependency Scopes
Define your own dependency configurations, such as for integration tests or code generators, instead of forcing everything into compile and runtime.
Documentation for Custom Dependency Scopes -
File Based Dependencies
Depend on local jars or file trees when a library isn't in any repository. They carry no metadata and no transitive dependencies, so use them for legacy code and migrations only.
Documentation for File Based Dependencies -
Custom Repository Layout
Resolve from Ivy repositories with any directory structure by declaring a pattern layout, so in-house artifact stores still work.
Documentation for Custom Repository Layout -
Maven and Ivy Repository Compatible
Use any existing Maven or Ivy repository as is, so adopting Gradle doesn't mean replatforming your artifacts.
Documentation for Maven and Ivy Repository Compatible -
Native BOM support
Import a BOM like Spring Boot's directly to keep versions consistent, with no extra plugin.
Documentation for Native BOM support -
3rd Party Dependency Cache
Gradle caches downloaded dependencies and metadata locally, so repeat builds skip the network, and
Documentation for 3rd Party Dependency Cache--offlinereuses the cache with no network access.
Controlling Dependency Versions
-
Dynamic Dependencies
Ask for
Documentation for Dynamic Dependencieslatest.releaseor8.+to pick up updates without editing versions, and pair it with locking because results can change between builds. -
Dynamic Dependency Locking
Lock dynamic versions to the exact versions in a committed lockfile, so builds are reproducible until you deliberately update them.
Documentation for Dynamic Dependency Locking -
Dynamic Dependencies Selection Rules
Reject known-bad versions (for example by version or status) so a dynamic dependency picks the next best candidate instead of a broken release.
Documentation for Dynamic Dependencies Selection Rules -
Dependency Version Alignment
Keep related libraries like Jackson modules on the same version to avoid mismatches that cause hard-to-debug runtime errors.
Documentation for Dependency Version Alignment -
Version Conflict Resolution
When versions conflict, Gradle picks the highest requested version by default, and you can use
Documentation for Version Conflict Resolutionstrictly,rejector constraints to override that. -
Substitution of Compatible Libraries
Declare that one library replaces another (such as google-collections by Guava), so Gradle never puts both on the classpath.
Documentation for Substitution of Compatible Libraries -
Enhanced Metadata Resolution Support
Fix wrong or missing metadata from third-party libraries (dependencies, variants, capabilities) with rules in your build, without waiting for upstream.
Documentation for Enhanced Metadata Resolution Support -
Replacement of external and project dependencies
Swap a published library for a local project in your build, or the reverse, so you only check out the modules you're working on.
Documentation for Replacement of external and project dependencies
Standardizing Builds Across Teams
-
Self-Provisioning Build Environment
The Gradle wrapper downloads and caches the exact Gradle version your project declares, so teammates and CI need only a JDK and no Gradle install.
Documentation for Self-Provisioning Build Environment -
Version Controlled Build Configuration
Commit
Documentation for Version Controlled Build Configurationgradle.propertiesso JVM args, caching and parallelism settings are identical for everyone. -
Custom Distributions
Host your own Gradle distribution with company init scripts in
Documentation for Custom Distributionsinit.dand point the wrapper at it, so every build gets your rules automatically. -
User-Based Behavior Injection
Put init scripts in your Gradle user home to add personal behavior, such as notifications or a mirror repository, to every build on your machine without touching any project.
Documentation for User-Based Behavior Injection -
Per Build Behavior Injection
Pass an init script with
Documentation for Per Build Behavior Injection-Ito add or enforce behavior for one build, for example forcing a company repository, without changing the project.
Securing Your Build
-
Dependency Verification
Verify checksums and signatures of dependencies and plugins against a committed metadata file, so a tampered or substituted artifact fails the build.
Documentation for Dependency Verification -
Repository Content Filtering
Declare which repository may supply which groups or modules (use
Documentation for Repository Content FilteringexclusiveContentto pin them), so private artifacts don't leak and look-alike public packages can't override them. -
Gradle Distribution Verification
Set
Documentation for Gradle Distribution VerificationdistributionSha256Sumin the wrapper properties so the wrapper fails the build if the downloaded Gradle distribution doesn't match.
Gradle publishes security fixes for supported versions. For security fixes on older Gradle versions, see the Gradle Security Subscription.
Task Graph and Build Lifecycle Control
-
Advanced Task Ordering
Control task order with
Documentation for Advanced Task OrderingmustRunAfterandshouldRunAftereven when tasks don't depend on each other, without creating false dependencies. -
Task Dependency Inference
Gradle works out which tasks must run first from the inputs you declare, so you maintain less wiring and have fewer broken builds.
Documentation for Task Dependency Inference -
Task Finalizers
Guarantee cleanup, like shutting down a database or container, runs after a task even when that task fails.
Documentation for Task Finalizers -
Dynamic Task Creation
Generate tasks on demand from rules instead of hand-writing one for every variation.
Documentation for Dynamic Task Creation -
Domain Object Containers
Hook into any container (repositories, dependencies, tasks, plugins) to run logic when elements are added, so you can enforce rules or configure items without brittle scripting.
Documentation for Domain Object Containers -
Build Lifecycle Hooks
Hook into the build lifecycle to add logging, collect data, or inject custom behavior.
Documentation for Build Lifecycle Hooks
Plugin and Task Authoring
-
TestKit for Functional Testing
Test your plugin by running real builds and checking the results across Gradle versions, so you ship with confidence.
Documentation for TestKit for Functional Testing -
Custom Command Line Options
Annotate a task property with
Documentation for Custom Command Line Options@Optionto expose it as a--flagon the command line, with built-in help output. -
Publishing Multiple Artifacts
Publish several artifacts per project, such as an API jar, an implementation jar, or test fixtures, so consumers get only what they need.
Documentation for Publishing Multiple Artifacts
For Your Language and Platform
Built-in support for JVM languages, Android, C++, and Swift.
JVM Projects
-
Incremental Compilation for Java
Gradle recompiles only the classes affected by a change instead of the whole project, so edit-compile cycles stay short.
Documentation for Incremental Compilation for Java -
Compile Avoidance for Java
Skip recompiling downstream projects when a dependency changes only in its private API, so a small change doesn't trigger a rebuild across your whole build.
Documentation for Compile Avoidance for Java -
Built-in Groovy Support
Build Groovy, or mixed Groovy and Java, projects out of the box with no extra setup.
Documentation for Built-in Groovy Support -
Built-in Scala Support
Build Scala, or mixed Scala and Java, projects out of the box with no extra setup.
Documentation for Built-in Scala Support -
Built-in Support for JVM Code Quality Tools
Run Checkstyle, CodeNarc, PMD, JaCoCo, and more with plugins that ship in the box, so quality checks are one line away.
-
Packaging for JARs, WARs, and EARs
Package your code into JARs, WARs, and EARs with built-in tasks, with no extra plugins to chase.
Documentation for Packaging for JARs, WARs, and EARs -
Publishing to Maven Repositories
Publish to any Maven-compatible repository (Nexus, Artifactory, GitHub Packages, internal repos) with the built-in
Documentation for Publishing to Maven Repositoriesmaven-publishplugin; Maven Central needs a dedicated plugin. -
Publishing to Ivy Repositories
Publish to Ivy repositories with the directory layout you need, so you can serve consumers that still depend on Ivy.
Documentation for Publishing to Ivy Repositories -
Artifact Signing
Sign your artifacts with OpenPGP so consumers can verify they came from you, as repositories like Maven Central require.
Documentation for Artifact Signing
Android Builds
-
Official Android Build Tool
Gradle is the build system behind Android Studio and the Android Gradle Plugin, so you get first-party tooling. See the Android docs.
C++ and Swift Builds
-
Build C++ Projects
Build C++ applications and libraries with the
Documentation for Build C++ Projectscpp-applicationandcpp-libraryplugins, including testing and IDE project generation. -
Build Swift Projects
Build Swift applications and libraries with the
Documentation for Build Swift Projectsswift-applicationandswift-libraryplugins.
For Developer Tool Providers
For people building IDEs, CI systems, and other tools that need to drive Gradle.
Tooling API
-
SDK for embedded usage
Drive Gradle from your own tool through a supported API instead of scraping command-line output.
Documentation for SDK for embedded usage -
Version agnostic
One Tooling API version works with the last five major Gradle versions and the next major, so your tool keeps working as users upgrade.
Documentation for Version agnostic -
Querying for Project model
Get the project hierarchy, dependencies, source directories, and tasks programmatically, so your tool understands the build without parsing it.
Documentation for Querying for Project model -
Execute a build
Run builds and stream output and progress, so you can show users live status in your UI.
Documentation for Execute a build -
Build Cancellation
Cancel a running build from your tool so users never get stuck waiting.
Documentation for Build Cancellation -
Provide Eclipse Project Model
Get how a project maps to Eclipse, so you can import Gradle builds correctly into Eclipse-based tools.
Documentation for Provide Eclipse Project Model -
Provide IDEA Project Model
Get how a project maps to IntelliJ IDEA, so you can import Gradle builds correctly into IDEA-based tools.
Documentation for Provide IDEA Project Model -
Run specific tests
Run an individual test class or method through the TestLauncher API, so your IDE can offer a fast 'run this test' button.
Documentation for Run specific tests -
Register for progress events
Receive configuration, task and test progress events as they happen, so you can display detailed live build status.
Documentation for Register for progress events
Log Levels and Output Control
-
Log Levels
Control how much output Gradle prints with
Documentation for Log Levels-q,-w,-iand-dororg.gradle.logging.level, so your console shows what matters. -
Redirecting Output from Other Tools
Gradle routes Ant, Ivy, Log4j, JUL and stdout/stderr output into its own logging, and lets you choose the log level for captured stdout/stderr.
Documentation for Redirecting Output from Other Tools
Start building with Gradle
Follow the getting started guide, or see how Gradle compares to Maven.