Skip to content

Commit

Permalink
Set apiVersion and languageVersion on the JVM for better compatibility (
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin authored Aug 25, 2023
1 parent 9f38e14 commit 41cf99f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 13 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ kotlin {
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
apiVersion = "1.7"
languageVersion = "1.7"
}
}
}
Expand Down Expand Up @@ -71,7 +73,11 @@ kotlin {
}

sourceSets {
val commonMain by getting
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.7.21")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
Expand All @@ -81,7 +87,12 @@ kotlin {
val nonJvmMain by creating { dependsOn(commonMain) }
val nonJvmTest by creating { dependsOn(commonTest) }
val jsMain by getting { dependsOn(nonJvmMain) }
val wasmMain by getting { dependsOn(nonJvmMain) }
val wasmMain by getting {
dependsOn(nonJvmMain)
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-wasm")
}
}
val jsTest by getting { dependsOn(nonJvmTest) }
val nativeMain by creating { dependsOn(nonJvmMain) }
val nativeTest by creating { dependsOn(nonJvmTest) }
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ POM_DEVELOPER_NAME=Ben Asher
POM_NAME=UUID
POM_DESCRIPTION=A Kotlin multiplatform implementation of a v4 RFC4122 UUID

org.gradle.jvmargs=-Xmx4g
org.gradle.jvmargs=-Xmx4g

kotlin.stdlib.default.dependency=false

0 comments on commit 41cf99f

Please sign in to comment.