Kotlin/kotlinx.html

Cannot use kotlinx html in project targeting Java 1.8

3flex opened this issue · 2 comments

3flex commented

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.

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

e5l commented

Fixed with 0.9.1