Kotlin / kotlinx.html

Kotlin DSL for HTML
Apache License 2.0
1.63k stars 133 forks source link

Cannot use kotlinx html in project targeting Java 1.8 #226

Closed 3flex closed 1 year ago

3flex commented 1 year ago

After updating to kotlinx-html-jvm:0.9.0 from 0.8.1 there are multiple errors when trying to build the detekt project:

e: file:///home/runner/work/detekt/detekt/detekt-report-html/src/main/kotlin/io/github/detekt/report/html/HtmlOutputReport.kt:71:82 Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option

Class files in kotlinx-html-jvm-0.9.0.jar have bytecode version 55 (Java 11), while 0.8.1 has bytecode version 52 (Java 8).

I didn't see any documented change re: new minimum JVM version requirements in the 0.9.0 release notes so I'm assuming this is unintended.

mikaelstaldal commented 1 year ago

I get this problem when building in IntelliJ even though my project has JVM target 17.

e5l commented 1 year ago

Fixed with 0.9.1