JetBrains / intellij-platform-plugin-template

Template repository for creating plugins for IntelliJ Platform
Apache License 2.0
3.14k stars 638 forks source link

IntelliJ not detecting kotlinOptions.jvmTarget set by jvmToolchain #309

Closed segevfiner closed 1 year ago

segevfiner commented 2 years ago

Describe the bug: Without:

tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "11"
}

IntelliJ fails to understand that jvmToolchain sets the Kotlin jvmTarget and issues warnings about it, despite no warnings being issued by the Gradle build itself. I have to add that snippet to a new plugin project build.gradle.kts to silence the warnings.

Steps to reproduce:

  1. Create a new project.
  2. You will get warnings about service calls that cannot be inlined from jvmTarget = "1.8" to code compiled for target 11.

Expected behavior: The correct jvmTarget version is used so no warnings are issued.

Additional context: IntelliJ IDEA 2022.2.3

hsz commented 1 year ago

Obsolete with the 1.3.0 setup.