Skip to content

Commit

Permalink
fix: configure JVM target to a reasonable LTS (11) (#227)
Browse files Browse the repository at this point in the history
Previously we used whatever target we built with (23). But this is a library, so we should be compatible with currently supported LTS versions.

fixes #223
  • Loading branch information
sargunv authored Jan 3, 2025
1 parent abf9996 commit 5b55034
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 8 deletions.
10 changes: 8 additions & 2 deletions demo-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,19 @@ android {

kotlin {
androidTarget {
compilerOptions { jvmTarget.set(JvmTarget.JVM_11) }
compilerOptions {
jvmTarget.set(JvmTarget.valueOf(project.properties["jvmTarget"]!!.toString()))
}
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
}
iosArm64()
iosSimulatorArm64()
iosX64()
jvm("desktop")
jvm("desktop") {
compilerOptions {
jvmTarget.set(JvmTarget.valueOf(project.properties["jvmTarget"]!!.toString()))
}
}
js(IR) {
browser { commonWebpackConfig { outputFileName = "app.js" } }
binaries.executable()
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ androidMinSdk=23
androidCompileSdk=35
androidTargetSdk=35
iosDeploymentTarget=12.0
jvmTarget=JVM_11
kotlin.code.style=official
kotlin.daemon.jvmargs=-Xmx2048M
kotlin.incremental.wasm=true
Expand Down
10 changes: 8 additions & 2 deletions lib/maplibre-compose-expressions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@ mavenPublishing {

kotlin {
androidTarget {
compilerOptions { jvmTarget.set(JvmTarget.JVM_11) }
compilerOptions {
jvmTarget.set(JvmTarget.valueOf(project.properties["jvmTarget"]!!.toString()))
}
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
publishLibraryVariants("release", "debug")
}
iosArm64()
iosSimulatorArm64()
iosX64()
jvm("desktop")
jvm("desktop") {
compilerOptions {
jvmTarget.set(JvmTarget.valueOf(project.properties["jvmTarget"]!!.toString()))
}
}
js(IR) { browser() }
wasmJs { browser() }

Expand Down
10 changes: 8 additions & 2 deletions lib/maplibre-compose-material3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,20 @@ mavenPublishing {

kotlin {
androidTarget {
compilerOptions { jvmTarget.set(JvmTarget.JVM_11) }
compilerOptions {
jvmTarget.set(JvmTarget.valueOf(project.properties["jvmTarget"]!!.toString()))
}
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
publishLibraryVariants("release", "debug")
}
iosArm64()
iosSimulatorArm64()
iosX64()
jvm("desktop")
jvm("desktop") {
compilerOptions {
jvmTarget.set(JvmTarget.valueOf(project.properties["jvmTarget"]!!.toString()))
}
}
js(IR) { browser() }

cocoapods {
Expand Down
10 changes: 8 additions & 2 deletions lib/maplibre-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,20 @@ val copyDesktopResources by

kotlin {
androidTarget {
compilerOptions { jvmTarget.set(JvmTarget.JVM_11) }
compilerOptions {
jvmTarget.set(JvmTarget.valueOf(project.properties["jvmTarget"]!!.toString()))
}
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
publishLibraryVariants("release", "debug")
}
iosArm64()
iosSimulatorArm64()
iosX64()
jvm("desktop")
jvm("desktop") {
compilerOptions {
jvmTarget.set(JvmTarget.valueOf(project.properties["jvmTarget"]!!.toString()))
}
}
js(IR) { browser() }

cocoapods {
Expand Down

0 comments on commit 5b55034

Please sign in to comment.