Skip to content

Commit fabe063

Browse files
committed
Raise the minimum supported version of Kotlin to 1.7
Closes gh-31391
1 parent aa71ba0 commit fabe063

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

buildSrc/src/main/java/org/springframework/boot/build/KotlinConventions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* <ul>
3131
* <li>{@link KotlinCompile} tasks are configured to:
3232
* <ul>
33-
* <li>Use {@code apiVersion} and {@code languageVersion} 1.6.
33+
* <li>Use {@code apiVersion} and {@code languageVersion} 1.7.
3434
* <li>Use {@code jvmTarget} 17.
3535
* <li>Treat all warnings as errors
3636
* <li>Suppress version warnings
@@ -50,8 +50,8 @@ void apply(Project project) {
5050

5151
private void configure(KotlinCompile compile) {
5252
KotlinJvmOptions kotlinOptions = compile.getKotlinOptions();
53-
kotlinOptions.setApiVersion("1.6");
54-
kotlinOptions.setLanguageVersion("1.6");
53+
kotlinOptions.setApiVersion("1.7");
54+
kotlinOptions.setLanguageVersion("1.7");
5555
kotlinOptions.setJvmTarget("17");
5656
kotlinOptions.setAllWarningsAsErrors(true);
5757
List<String> freeCompilerArgs = new ArrayList<>(compile.getKotlinOptions().getFreeCompilerArgs());

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/kotlin.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Feel free to join the #spring channel of https://slack.kotlinlang.org/[Kotlin Sl
1313

1414
[[features.kotlin.requirements]]
1515
=== Requirements
16-
Spring Boot requires at least Kotlin 1.6.x and manages a suitable Kotlin version through dependency management.
16+
Spring Boot requires at least Kotlin 1.7.x and manages a suitable Kotlin version through dependency management.
1717
To use Kotlin, `org.jetbrains.kotlin:kotlin-stdlib` and `org.jetbrains.kotlin:kotlin-reflect` must be present on the classpath.
1818
The `kotlin-stdlib` variants `kotlin-stdlib-jdk7` and `kotlin-stdlib-jdk8` can also be used.
1919

0 commit comments

Comments
 (0)