Browse Source

Gradle Plugin: Fix NPE and use 1.8 by default (#2164)

pull/2174/head
Philip Wedemann 2 years ago committed by GitHub
parent
commit
36b232b653
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt

4
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt

@ -126,7 +126,9 @@ class ComposePlugin : Plugin<Project> {
project.tasks.withType(KotlinCompile::class.java) {
it.kotlinOptions.apply {
if (overrideDefaultJvmTarget) {
jvmTarget = "11".takeIf { jvmTarget.toDouble() < 11 } ?: jvmTarget
if (jvmTarget.isNullOrBlank() || jvmTarget.toDouble() < 1.8) {
jvmTarget = "1.8"
}
}
}
}

Loading…
Cancel
Save