Change guides to use Kotlin DSL as well.
#1,485 opened on Sep 19, 2024
Repository metrics
- Stars
- (51 stars)
- PR merge metrics
- (PR metrics pending)
Description
Since Micronaut 4.2, Micronaut Launch CLI defaults to Gradle with Kotlin DSL. However, Micronaut Guides are getting build with Gradle Groovy DSL. We can change the default DSL in Guides to be Kotlin as well. But we will need to check we are not showing any build snippets in Groovy DSL format.
This morning I was looking at this one. But the section I have the query about is common to all the guides I have looked at - creating the application.
The command is: mn create-app example.micronaut.micronautguide
--features=management,graalvm
--build=gradle
--lang=java
--test=junit And the note underneath goes on to say:If you don’t specify the --build argument, Gradle is used as the build tool. If you don’t specify the --lang argument, Java is used as the language. If you don’t specify the --test argument, JUnit is used for Java and Kotlin, and Spock is used for Groovy.
Which implies that the above command: Is explicitly stating the defaults If you're happy with the defaults you should get the same output by running:
mn create-app example.micronaut.micronautguide
--features=management,graalvmHowever, the output of the two commands is different. For example, in the first case, I get gradle.build and in the second case, gradle.build.kts (there are other differences).
Is the command behaving as expected? If it is, then I think the text in the guide needs to change as it is confusing.