Skip to content

Commit

Permalink
Fix gradle kotlin DSL deprecation and clean up java version declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstaeding committed May 27, 2024
1 parent dced8be commit c1c9a8b
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.io.ByteArrayOutputStream

plugins {
Expand Down Expand Up @@ -36,6 +36,7 @@ allprojects {

kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
freeCompilerArgs = listOf(
"-opt-in=kotlin.RequiresOptIn",
"-Xcontext-receivers",
Expand All @@ -46,15 +47,4 @@ allprojects {
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}

tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "21"
}
withType<JavaCompile> {
options.encoding = "UTF-8"
sourceCompatibility = "21"
targetCompatibility = "21"
}
}
}

0 comments on commit c1c9a8b

Please sign in to comment.