Kotlin 2.0 will be released soon (December) Which spring boot release will target it? See https://github.com/JetBrains/kotlin/releases/tag/v2.0.0-Beta1

Comment From: wilkinsona

This will have to be coordinated with the rest of the Spring portfolio. It will be Spring Boot 3.3 at the earliest. This issue isn't actionable at the moment so I'm going to close it for now. We will create the necessary issues when the time comes.

Comment From: aleksandrakoziel

@wilkinsona Kotlin 2.0 is now officialy released. Do you plan to re-open this issue and update it soon? More info: https://blog.jetbrains.com/kotlin/2024/05/celebrating-kotlin-2-0-fast-smart-and-multiplatform/ https://kotlinlang.org/docs/whatsnew20.html https://kotlinlang.org/docs/compatibility-guide-20.html

Comment From: bclozel

@aleksandrakoziel this is too late for ou 3.3 milestone, which has been released. Maybe create an enhancement request in Spring Framework to request Kotlin 2.0 support?

Comment From: schnapster

Looks like Kotlin v2 is targetted for Spring Framework v7.0.x: https://github.com/spring-projects/spring-framework/issues/33629

Comment From: StefanLobbenmeierObjego

I stumbled upon this issue after seeing that implementation(enforcedPlatform(SpringBootPlugin.BOM_COORDINATES)) downgrades the kotlin version, while id("io.spring.dependency-management") version "1.1.6" permits the upgraded kotlin version.

Does this mean that until Nov 2025 using the new kotlin version is unsupported and I should also not compile with kotlin 2?

If so, is there a good way to set the kotlin plugin version automatically to the supported one? Currently it is set separately:

plugins {
    val kotlinVersion = "2.1.0"

    java
    kotlin("jvm") version kotlinVersion
    kotlin("plugin.lombok") version kotlinVersion
    id("org.springframework.boot") version "3.3.6"
}

Or am I overthinking it and it is safe to compile with kotlin 2.1 and use kotlin-stdlib and kotlin-reflect 1.9.25?

Comment From: philwebb

@sdeleuze might know the answer. He's much more familiar with Kotlin than I am.

Comment From: sdeleuze

Kotlin Gradle (or Maven) plugins and kotlin-stdlib / kotlin-reflect versions must be the same.