Skip to content

Commit 8789bf4

Browse files
committed
perf: change compiler target to java11/kotlin2.0
1 parent 87eb8ea commit 8789bf4

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/setup-java@v4
1616
with:
1717
distribution: 'temurin'
18-
java-version: '17'
18+
java-version: '11'
1919

2020
- name: Write Secrets Info
2121
run: |

json5/build.gradle.kts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
11
import com.vanniktech.maven.publish.SonatypeHost
2+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
3+
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
24

35
plugins {
46
alias(libs.plugins.kotlin.multiplatform)
57
alias(libs.plugins.kotlin.serialization)
68
alias(libs.plugins.maven.publish)
79
}
810

11+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
12+
compilerOptions {
13+
jvmTarget = JvmTarget.JVM_11
14+
languageVersion = KotlinVersion.KOTLIN_2_0
15+
apiVersion = KotlinVersion.KOTLIN_2_0
16+
}
17+
}
18+
919
kotlin {
10-
jvm()
20+
jvm {
21+
compilerOptions {
22+
jvmTarget = JvmTarget.JVM_11
23+
languageVersion = KotlinVersion.KOTLIN_2_0
24+
apiVersion = KotlinVersion.KOTLIN_2_0
25+
}
26+
}
1127

1228
// Kotlin/Native - Linux
1329
linuxX64()
@@ -30,6 +46,10 @@ kotlin {
3046

3147
sourceSets {
3248
commonMain {
49+
compilerOptions {
50+
languageVersion = KotlinVersion.KOTLIN_2_0
51+
apiVersion = KotlinVersion.KOTLIN_2_0
52+
}
3353
dependencies {
3454
api(libs.kotlinx.serialization.json)
3555
}

0 commit comments

Comments
 (0)