1
+ import org.gradle.api.JavaVersion.VERSION_21
1
2
import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21
2
- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3
3
4
4
repositories {
5
5
mavenCentral()
@@ -8,10 +8,10 @@ repositories {
8
8
maven(" https://repo.spring.io/snapshot" )
9
9
}
10
10
plugins {
11
- id(" org.springframework.boot" ) version " 3.3 .0-SNAPSHOT"
12
- id(" io.spring.dependency-management" ) version " 1.1.4 "
13
- kotlin(" jvm" ) version " 2.0.0 "
14
- kotlin(" plugin.spring" ) version " 2.0.0 "
11
+ id(" org.springframework.boot" ) version " 3.4 .0-SNAPSHOT"
12
+ id(" io.spring.dependency-management" ) version " 1.1.6 "
13
+ kotlin(" jvm" ) version " 2.0.20 "
14
+ kotlin(" plugin.spring" ) version " 2.0.20 "
15
15
}
16
16
dependencies {
17
17
implementation(" org.springframework.boot:spring-boot-starter-web" )
@@ -21,7 +21,11 @@ dependencies {
21
21
testImplementation(" io.mockk:mockk:1.13.4" )
22
22
testRuntimeOnly(" org.junit.platform:junit-platform-launcher" )
23
23
}
24
- tasks.withType<KotlinCompile > {
24
+ java {
25
+ sourceCompatibility = VERSION_21
26
+ targetCompatibility = VERSION_21
27
+ }
28
+ kotlin {
25
29
compilerOptions {
26
30
jvmTarget = JVM_21
27
31
freeCompilerArgs.addAll(
@@ -32,10 +36,6 @@ tasks.withType<KotlinCompile> {
32
36
)
33
37
}
34
38
}
35
- tasks.withType<JavaCompile > {
36
- sourceCompatibility = " 21"
37
- targetCompatibility = " 21"
38
- }
39
39
tasks.test {
40
40
useJUnitPlatform()
41
41
jvmArgs(" --enable-preview" )
0 commit comments