Skip to content

Commit

Permalink
chore: proper kotlin 2.0.0 dsl foe java version (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikAoJk authored Jun 4, 2024
1 parent 03d0e59 commit 5d08bff
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

group = "no.nav.pdfgen"
version = properties["version"]?.takeIf { it is String && it.isNotEmpty() && it != "unspecified" } ?: "local-build"
println(version)
Expand All @@ -17,7 +19,7 @@ val verapdfVersion = "1.26.1"
val ktfmtVersion = "0.44"
val kotlinloggerVersion = "6.0.9"
val kotestVersion = "5.9.0"
val javaVersion = JavaVersion.VERSION_21
val javaVersion = JvmTarget.JVM_21


plugins {
Expand All @@ -29,8 +31,13 @@ plugins {
id("java-library")
}

tasks {
kotlin {
compilerOptions {
jvmTarget.set(javaVersion)
}
}

tasks {
test {
useJUnitPlatform()
testLogging {
Expand All @@ -40,13 +47,6 @@ tasks {
}
}

compileKotlin {
kotlinOptions.jvmTarget = javaVersion.toString()
}
compileTestKotlin {
kotlinOptions.jvmTarget = javaVersion.toString()
}

spotless {
kotlin { ktfmt(ktfmtVersion).kotlinlangStyle() }
check {
Expand Down

0 comments on commit 5d08bff

Please sign in to comment.