Skip to content

Commit

Permalink
Updates KotlinCompile task with KotlinJvmCompile
Browse files Browse the repository at this point in the history
  • Loading branch information
iobruno committed Sep 17, 2024
1 parent 1a55e41 commit 42693ad
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.internal.jvm.Jvm
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

plugins {
kotlin("jvm") version "2.0.20"
jacoco
}

group = "io.petproject"
version = "1.0-SNAPSHOT"
version = "2.0-SNAPSHOT"

repositories {
mavenLocal()
Expand All @@ -22,9 +24,10 @@ dependencies {
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
}

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "21"
tasks.withType<KotlinJvmCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
}
}

Expand Down

0 comments on commit 42693ad

Please sign in to comment.