Support Gradle Kotlin DSL
See original GitHub issueLinked to https://github.com/spring-io/initializr/issues/331, I think it could make sense to support Gradle builds written in Kotlin instead of Groovy.
I am experimenting on that for a few month, and it works pretty well, see for example mixit or spring-boot-kotlin-demo build.gradle.kts
. As a bonus, that would be nice to make that the default for Kotlin project.
This feature is also valuable for Java projects since it provides full autocomplete and validation of Gradle builds unlike the Groovy variant.
This feature works with regular IntelliJ IDEA Kotlin plugin, but you need to use Kotlin 1.1 EAP plugin to get autocomplete and validation of your build file.
I plan to contribute this feature, that IMO makes sense as part of the Kotlin support provided by Spring Framework 5 (so a good fit with Spring Boot 2.0).
Issue Analytics
- State:
- Created 7 years ago
- Reactions:36
- Comments:25 (20 by maintainers)
Top GitHub Comments
Can we automatically generate a Kotlin-powered build.gradle.kts when the users selects Gradle as the build system and Kotlin as the language? That way we’d avoid another UI option at least.
Hey, quick summary to move forward. @eskatos contributed https://github.com/eskatos/start.spring.io-builds/tree/master/new-gradle-kotlin-dsl, which is a good starting point. Also regular Gradle builds now uses the new Gradle plugin thanks to the latest improvements shipped recently by the Boot team.
Could we agree on the design in order to allow me, another contributor from Gradle or the community to move forward on submitting a pull request?
Currently we have the following key -> value project types:
maven-project
-> “Maven Project”gradle-project
-> “Gradle Project”With Gradle Kotlin DSL support, I think I am still in favor of “just” introducing it as a new project type.
maven-project
-> “Maven Project”gradle-project
-> “Gradle Project”gradle-kts-project
-> “Gradle Kotlin DSL Project”@snicoll @wilkinsona Could you discuss that point to provide guidelines for those who will work on the pull request? Also since Gradle Kotlin DSL requires latest 5.x for first class support, do you plan to switch to Gradle 5.x at Boot 2.2 timeframe or should we use 5.x only for the Gradle Kotlin DSL?