Skip to content

Commit 65d2d01

Browse files
committed
feat: support JVM 8+ and compile with Java 21 & use Parsek core 1.0.0-beta.3
1 parent 7680781 commit 65d2d01

2 files changed

Lines changed: 29 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- uses: actions/setup-java@v3
6161
with:
6262
distribution: temurin
63-
java-version: 8
63+
java-version: 21
6464

6565
- name: Build with Gradle
6666
uses: gradle/actions/setup-gradle@v3

build.gradle.kts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
13
plugins {
24
kotlin("jvm") version "1.9.20"
35
kotlin("kapt") version "1.9.20"
@@ -26,7 +28,7 @@ dependencies {
2628
if (bootstrap) {
2729
compileOnly(project(mapOf("path" to ":Parsek")))
2830
} else {
29-
compileOnly("com.github.StatuParsek:Parsek:2.1.0")
31+
compileOnly("com.github.StatuParsek:Parsek:v1.0.0-beta.3")
3032
}
3133

3234
compileOnly(kotlin("stdlib-jdk8"))
@@ -122,4 +124,29 @@ publishing {
122124
}
123125
}
124126
}
127+
}
128+
129+
java {
130+
withJavadocJar()
131+
withSourcesJar()
132+
133+
// Use Java 21 for compilation
134+
toolchain {
135+
languageVersion.set(JavaLanguageVersion.of(21))
136+
}
137+
}
138+
139+
kotlin {
140+
jvmToolchain(21) // Ensure Kotlin uses the Java 21 toolchain
141+
}
142+
143+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
144+
compilerOptions {
145+
jvmTarget.set(JvmTarget.JVM_1_8)
146+
}
147+
}
148+
149+
tasks.withType<JavaCompile> {
150+
sourceCompatibility = "1.8"
151+
targetCompatibility = "1.8"
125152
}

0 commit comments

Comments
 (0)