Skip to content

Commit dc6bc39

Browse files
committed
gradle: Build with JDK 21
Checkstyle was already requiring JDK 21 and now about libraries need it too Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
1 parent 0a0b5b4 commit dc6bc39

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

app/build.gradle.kts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,8 @@ val gitWorkingBranch = providers.exec {
2424
commandLine("git", "rev-parse", "--abbrev-ref", "HEAD")
2525
}.standardOutput.asText.map { it.trim() }
2626

27-
java {
28-
toolchain {
29-
languageVersion = JavaLanguageVersion.of(17)
30-
}
31-
}
32-
3327
kotlin {
28+
jvmToolchain(21)
3429
compilerOptions {
3530
// TODO: Drop annotation default target when it is stable
3631
freeCompilerArgs.addAll(
@@ -142,13 +137,6 @@ ksp {
142137
// Custom dependency configuration for ktlint
143138
val ktlint by configurations.creating
144139

145-
// https://checkstyle.org/#JRE_and_JDK
146-
tasks.withType<Checkstyle>().configureEach {
147-
javaLauncher = javaToolchains.launcherFor {
148-
languageVersion = JavaLanguageVersion.of(21)
149-
}
150-
}
151-
152140
checkstyle {
153141
configDirectory = rootProject.file("checkstyle")
154142
isIgnoreFailures = false

0 commit comments

Comments
 (0)