You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At Gradle, part of our vision is to provide an elegant and extensible declarative build language that enables expressing any build clearly and understandably. We are working on Declarative Gradle to realize that part of the vision.
Our key principles are:
Ease of use for regular software developers.
Software developers should be able to define any software in a clear and understandable way so that they can build their software without the need to understand the details of how the build system works.
Complete flexibility for build engineers and advanced users.
Build engineers 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 software definition automatically or through UI reliably.
Concept
This is how Declarative Gradle could look like:
Expand code
// Declare the type of software that the project produces// There is no plugin application, as Gradle infers this from the "javaLibrary" type definition
javaLibrary {
// All information about the library is grouped here// GroupID/ArtifactID/Version for publishing
publishedAs("my-group:my-lib:2.0")
// Common dependencies for all targets
dependencies {
api("some:lib:1.2")
implementation(projects.someLib)
}
// A library might have more than one target
targets {
// All information about specific targets is grouped here// Declare Java 11 as a target
java(11) {
// Specific information about Java 11 target// An additional dependency that is used only for Java 11
dependencies {
implementation("some:back-port-lib:1.5")
}
}
// Declare Java 21 as a target, with no additional information
java(21)
}
tests {
// All information about the tests is grouped here
unit {
// Dependencies for the unit tests
dependencies {
implementation("some:other-lib:1.4")
}
}
}
}
Declarative Gradle is an experimental project. Currently, no compatibility is guaranteed, and there is no commitment to the DSL syntax and available features. More information will be released soon. Any feedback is welcome!
The content you are editing has changed. Please copy your edits and refresh the page.
At Gradle, part of our vision is to provide an elegant and extensible declarative build language that enables expressing any build clearly and understandably. We are working on Declarative Gradle to realize that part of the vision.
Our key principles are:
Software developers should be able to define any software in a clear and understandable way so that they can build their software without the need to understand the details of how the build system works.
Build engineers should maintain the current level of flexibility and be able to automate a wide range of software build automation scenarios with custom build logic.
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 software definition automatically or through UI reliably.
Concept
This is how Declarative Gradle could look like:
Expand code
References
Discuss
#declarative-gradle
on the Community SlackStatus
Declarative Gradle is an experimental project. Currently, no compatibility is guaranteed, and there is no commitment to the DSL syntax and available features. More information will be released soon. Any feedback is welcome!
Key milestones
The text was updated successfully, but these errors were encountered: