Skip to content

Declarative Gradle#

a a a

At Gradle, part of our vision is to provide an elegant and extensible declarative build language that enables expressing any build in a clear and understandable way. We are working on Declarative Gradle to realize that part of the vision. This is an experimental project, stay tuned for updates!

Learn more in the Declarative Gradle Announcement blog post and other publications.


Declarative Gradle is an experimental project. Currently, no compatibility is guaranteed, and there is no commitment to the DSL syntax and available features.

Learn how you can contribute in the Participate section.

Key Principles#

  • Ease of use for regular software developers. Software developers should be able to define any software and build their projects without the need to understand the details of how the build system works.
  • Complete flexibility for build engineers and advanced users. Experienced Gradle users should maintain the current level of flexibility and be able to automate a wide range of software build automation scenarios with custom build logic.
  • Excellent IDE integration. Importing the software project to the IDE and interacting with it should be fast and fully reliable. IDEs and other tools should be able to change the definition automatically or through UI reliably.

We implement those principles through a declarative DSL which is a tailored tiny subset of the Kotlin language. The Declarative Gradle Announcement outlines more details about the project and the new Declarative DSL we are building.

A Glimpse#

Here is a very brief example of what the Declarative Gradle syntax looks like for a Java application.

javaApplication {
    javaVersion = 21
    mainClass = "com.example.App"

    dependencies {

Looks familiar, right?

As noted above, this syntax is experimental and might change during the experiment.

Learn More#

The Declarative Gradle experiment is still in an early stage but is ready for your feedback!

  • Getting Started - Learn how to try Declarative Gradle yourself.
  • Documentation - Learn about the fundamentals behind Declarative Gradle.
  • Participate - Learn how you can help shape the future of Declarative Gradle.
  • Resources - Learn more from conferences, interviews, articles, etc.