diff --git a/docs/projects/declarative-gradle/README.md b/docs/projects/declarative-gradle/README.md deleted file mode 100644 index eda062e..0000000 --- a/docs/projects/declarative-gradle/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# Declarative Gradle - -_Declarative Gradle_ is an experimental project. -At this point, no compatibility is guaranteed, -as well as there is no commitment to the DSL syntax -and available features. -More information will be released soon -Any feedback is welcome! - - - -## Concept - -Below a very brief example of how the Declarative Gradle syntax may look like. This example shows the definition of a Java library that targets both Java 11 and 21: - -```kotlin -// 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") - } - } - } -} -``` - -A typical Java library, which targets a single version of Java, might look like this: - -```kotlin -javaLibrary { - publishedAs("my-group:my-lib:2.0") - - dependencies { - api("some:lib:1.2") - implementation(projects.someLib) - } - - // This library targets Java 21 only - java(21) - - tests { - unit { - dependencies { - implementation("some:other-lib:1.4") - } - } - } -} -``` - -## Read More - -- [Initial Declarative Gradle Announcement and Full Manifesto](https://blog.gradle.org/declarative-gradle) -- [Declarative Gradle Prototypes](https://github.com/gradle/declarative-prototypes) - experimental samples - -## Discuss - -- `#declarative-gradle` channel on the community Slack -- Gradle Forums - -See [Gradle Community Resources](https://gradle.org/resources/) for the links to the channels. diff --git a/mkdocs-dotorg.yml b/mkdocs-dotorg.yml index 2be2071..cbf859c 100644 --- a/mkdocs-dotorg.yml +++ b/mkdocs-dotorg.yml @@ -118,7 +118,7 @@ nav: - Key Projects: projects/README.md - Core: - Gradle Build Tool: gradle/README.md - - Declarative Gradle: projects/declarative-gradle/README.md + - Declarative Gradle: declarative-gradle/README.md - Gradle X: gradlex/index.md - Gradle Build Tool: build-server-for-gradle/README.md - Integrations: @@ -172,6 +172,9 @@ plugins: - name: github-actions import_url: 'https://github.com/gradle/actions?branch=main&edit_uri=/blob/main/' imports: [ "README.md", "*" ] + - name: declarative-gradle + import_url: 'https://github.com/gradle/declarative-gradle?branch=main&edit_uri=/blob/main/' + imports: [ "README.md", "**/README.md" ] - name: gradlex import_url: 'https://github.com/gradlex-org/gradlex-org.github.io?branch=main&edit_uri=/blob/main/' imports: [ "index.md", "favicon.png" ] diff --git a/mkdocs.yml b/mkdocs.yml index d7bd7a3..5b3eb0f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -118,7 +118,7 @@ nav: - Key Projects: projects/README.md - Core: - Gradle Build Tool: gradle/README.md - - Declarative Gradle: projects/declarative-gradle/README.md + - Declarative Gradle: declarative-gradle/README.md - Gradle X: gradlex/index.md - Gradle Build Tool: build-server-for-gradle/README.md - Integrations: @@ -169,6 +169,9 @@ plugins: - name: gradle-profiler import_url: 'https://github.com/gradle/gradle-profiler?branch=master&edit_uri=/blob/master/' imports: [ "README.md" ] + - name: declarative-gradle + import_url: 'https://github.com/gradle/declarative-gradle?branch=main&edit_uri=/blob/main/' + imports: [ "README.md", "**/README.md" ] - name: github-actions import_url: 'https://github.com/gradle/actions?branch=main&edit_uri=/blob/main/' imports: [ "README.md", "*" ]