I have a Kotlin multiplatform project and the newest version of IDEA started to complain about @JvmStatic
usages in interfaces:
What's weird is that I added the necessary config to my build.gradle.kts
file:
kotlin {
jvm {
withJava()
jvmTarget(JavaVersion.VERSION_1_8)
}
// ...
}
and I also set it up in IDEA here:
and here:
and I also added the compiler parameter as IDEA suggested. What am I doing wrong?
If I build the project from the command line I get a BUILD SUCCESSFUL
.
This is a bug with multiplatform projects Gradle IDEA import: https://youtrack.jetbrains.com/issue/KT-43074. In this particular case it is acceptable to suppress the error until the bug is fixed:
@Suppress("JVM_STATIC_IN_INTERFACE_1_6") // remove when KT-43074 is fixed
fun empty() = ...