File tree Expand file tree Collapse file tree 1 file changed +29
-3
lines changed Expand file tree Collapse file tree 1 file changed +29
-3
lines changed Original file line number Diff line number Diff line change 11import org.gradle.api.tasks.testing.logging.TestExceptionFormat
22
33plugins {
4- kotlin(" jvm" ) version " 1.9.25 "
4+ kotlin(" jvm" ) version " 2.1.20 "
55 id(" com.adarshr.test-logger" ) version " 3.2.0"
66 id(" com.diffplug.spotless" ) version " 6.25.0"
77}
@@ -13,6 +13,8 @@ repositories {
1313
1414dependencies {
1515 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" )
1618 testImplementation(" org.amshove.kluent:kluent:1.73" )
1719}
1820
@@ -35,8 +37,32 @@ tasks.test {
3537 }
3638}
3739
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 )
4066}
4167
4268spotless {
You can’t perform that action at this time.
0 commit comments