Skip to content

Commit

Permalink
Using JVM target for all "compile Kotlin" tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
severn-everett committed May 23, 2024
1 parent 5a943c3 commit 5ce8fc0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("multiplatform") version "2.0.0"
Expand Down Expand Up @@ -33,6 +34,12 @@ repositories {
google()
}

tasks.withType<KotlinCompile> {
compilerOptions {
jvmTarget = JvmTarget.JVM_1_8
}
}

kotlin {
explicitApi()

Expand All @@ -46,10 +53,6 @@ kotlin {
}

jvm {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
jvmTarget = JvmTarget.JVM_1_8
}
}
js {
browser {
Expand Down

0 comments on commit 5ce8fc0

Please sign in to comment.