Skip to content

Commit

Permalink
Fix kotlin compile options in buildscript
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstaeding committed May 27, 2024
1 parent 0673642 commit b2fc671
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 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 @@ -38,27 +38,13 @@ allprojects {

kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
freeCompilerArgs = listOf(
"-opt-in=kotlin.RequiresOptIn",
"-Xcontext-receivers",
)
}
}

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}

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

// for uber jar
Expand Down

0 comments on commit b2fc671

Please sign in to comment.