-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Boot Gradle plugin setting kotlin.version based on kotlinPluginVersion #11711
Comments
|
I suspect there would be no need for |
Thank you so much for that one :-) |
Is it possible to move this functionality to the dependency-management plugin? I usually work on multi-module projects, and let the dependency-management plugin manage the dependencies for all the modules. I tried boot 2.0.0.RC1 with kotlin 1.2.21, and it worked perfectly for the modules with boot plugin applied, but in other modules the kotlin-stdlib and kotlin-stdlib-jre7 version were still 1.2.20. |
Unfortunately not, no. The fix relies on knowing that it's the |
Ah, that makes sense. It's not big deal, I am setting the |
@leoedeng As of Spring Boot 2.0.0.RC1, both are defined in the dependency management and yes we plan to switch to |
@sdeleuze Got it. That's really nice. |
I have got several users mentioning it is not obvious to define Kotlin version in a single place with Gradle
plugins { }
block (which is the recommended way to use Gradle, especially Gradle Kotlin DSL) and Spring Boot without adding agradle.properties
file (which is not supported yet by Gradle Kotlin DSL). Result can be mixed Kotlin versions in the classpath.I have been discussing with Gradle team, and they advised to use following syntax in order to be able to sync Spring Boot Kotlin version with Gradle compiler one.
While achieving single definition of Kotlin version without
gradle.properties
, this is not obvious for users to write this kind of declaration and not very nice to find it in start.spring.io generated projects.While discussing with @wilkinsona, he mentioned the possibility to update Spring Boot Gradle plugin to react to the Kotlin plugin being applied and set the
kotlin.version
property to the value ofkotlinPluginVersion
. This would be a very natural and elegant outcome to this issue.The text was updated successfully, but these errors were encountered: