gradle / declarative-gradle

Declarative Gradle is a project targeting better isolation of concern and expressing any build in a clear and understandable way
https://declarative.gradle.org/
Other
118 stars 14 forks source link
declarative-gradle declarative-language dsl gradle gradle-bt gradle-kotlin-dsl kotlin

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.

Status

Declarative Gradle is an experimental project, now in its second Early Access Preview (EAP). We invite you to try out Declarative Gradle, and to share feedback. The project includes the following experimental parts:

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.

Share Your Feedback

Key Principles

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 {
        implementation(project(":java-util"))
        implementation("com.google.guava:guava:32.1.3-jre")
    }
}

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!

Share Feedback

We invite you to try out Declarative Gradle, and to share your feedback.