-
Notifications
You must be signed in to change notification settings - Fork 89
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
Imports spring-boot-dependencies impacts Kotlin version in kotlinCompilerClasspath #235
Comments
This is working as designed. They can be aligned by setting the
|
Thank you for your prompt answer. It works! The equivalent with Kotlin DSL is
It does not explain why only kotlinCompilerClasspath was affected. As far I understand kotlin-gradle-plugin defines automatically ext.kotlin_version (an underscore, not a dot) which should be used by kotlin-dsl to set up ALL class paths. I have to dig more, but the issue is clearly not in spring-boot-dependencies. By the way, it is painful to have to repeat the Kotlin version. Maybe relying on Gradle's improved pom can be simpler in my case. The issue "Relationship between this plugin and Gradle's improved pom support" helps me to understand what happens. Thank you for the guidance. |
It may well be used for all class paths, but that would not necessarily prevent the dependency management plugin's resolution strategy from overriding the version based on what is specified in
Agreed. That's why Spring Boot's Gradle plugin (which you're not using) automatically aligns the two so the repetition is not necessary. |
Hi,
I am facing to a strange issue. After I migrate my project from Kotlin 1.2.x to Kotlin 1.3.10, I get the following compilation error when I include spring-boot-dependencies BOM
After investigation, my build uses incompatible versions of Kotlin. I solved some incompatibilities by specifying the version for all kotlin-stdlib-* in my project's dependencies. But the above issue remains at compile time. Below an extract of the dependencies of my project:
So kotlin-stdlib and kotlin-stdlib-common are downgraded in kotlinCompilerClasspath. But their version are correct in other class paths (including compileClasspath). That's why I observe the first issue only with a piece of code that create an Array (the constructor is inlined and depends on Kotlin API 1.3...)
The version 1.2.51 comes from kotlin.version which is defined by Spring Boot BOM. I don't understand why it affects only the Kotlin compile classpath, I suspect a naming collision with kotlin-jvm plugin.
I am using:
To reproduce, execute ./gradlew dependencies with the following build.gradle.kts file
The text was updated successfully, but these errors were encountered: