File tree 1 file changed +29
-3
lines changed
1 file changed +29
-3
lines changed Original file line number Diff line number Diff line change 1
1
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
2
2
3
3
plugins {
4
- kotlin(" jvm" ) version " 1.9.25 "
4
+ kotlin(" jvm" ) version " 2.1.20 "
5
5
id(" com.adarshr.test-logger" ) version " 3.2.0"
6
6
id(" com.diffplug.spotless" ) version " 6.25.0"
7
7
}
@@ -13,6 +13,8 @@ repositories {
13
13
14
14
dependencies {
15
15
testImplementation(" org.junit.jupiter:junit-jupiter:5.12.2" )
16
+ testImplementation(" org.junit.platform:junit-platform-launcher:1.12.1" )
17
+ testImplementation(" org.junit.platform:junit-platform-runner:1.12.1" )
16
18
testImplementation(" org.amshove.kluent:kluent:1.73" )
17
19
}
18
20
@@ -35,8 +37,32 @@ tasks.test {
35
37
}
36
38
}
37
39
38
- kotlin {
39
- jvmToolchain(19 )
40
+
41
+ // configuring java version
42
+ java {
43
+ sourceCompatibility = JavaVersion .VERSION_11
44
+ targetCompatibility = JavaVersion .VERSION_11
45
+ }
46
+
47
+ // alternate way
48
+ // kotlin {
49
+ // jvmToolchain(11)
50
+ // }
51
+
52
+
53
+ // extension level
54
+ // kotlin {
55
+ // compilerOptions {
56
+ // jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
57
+ // }
58
+ // }
59
+
60
+ // or
61
+
62
+ // task level
63
+ // overriding Compile kotlin task
64
+ tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > {
65
+ compilerOptions.jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget .JVM_11 )
40
66
}
41
67
42
68
spotless {
You can’t perform that action at this time.
0 commit comments