Skip to content
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

Upgrade to Kotlin 2.0 #38539

Open
meshpaul opened this issue Nov 24, 2023 · 7 comments
Open

Upgrade to Kotlin 2.0 #38539

meshpaul opened this issue Nov 24, 2023 · 7 comments
Labels
type: dependency-upgrade A dependency upgrade
Milestone

Comments

@meshpaul
Copy link

meshpaul commented Nov 24, 2023

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

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 24, 2023
@wilkinsona
Copy link
Member

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.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Nov 24, 2023
@wilkinsona wilkinsona added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 24, 2023
@aleksandrakoziel
Copy link

@bclozel
Copy link
Member

bclozel commented May 27, 2024

@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?

@schnapster
Copy link

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

@wilkinsona wilkinsona reopened this Nov 1, 2024
@wilkinsona wilkinsona added type: dependency-upgrade A dependency upgrade and removed status: declined A suggestion or change that we don't feel we should currently apply labels Nov 1, 2024
@wilkinsona wilkinsona added this to the 4.0.x milestone Nov 1, 2024
@StefanLobbenmeierObjego
Copy link

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?

@philwebb
Copy link
Member

philwebb commented Dec 9, 2024

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

@sdeleuze
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: dependency-upgrade A dependency upgrade
Projects
None yet
Development

No branches or pull requests

9 participants