intellij-platform-gradle-plugin icon indicating copy to clipboard operation
intellij-platform-gradle-plugin copied to clipboard

IDE incorrectly resolves classpath for external dependencies

Open WarningImHack3r opened this issue 7 months ago • 0 comments

What happened?

This issue is a follow-up of https://youtrack.jetbrains.com/issue/IJPL-156386, which is itself a follow-up of https://github.com/Kotlin/kotlinx.serialization/issues/2710.

The IDE incorrectly orders the classpath, leading to the IDE having a highlighting different from what's compiled.

Relevant log output or stack trace


Steps to reproduce

  1. Clone https://github.com/WarningImHack3r/serialization-override-issue
  2. Open src/main/kotlin/com/github/warningimhack3r/serializationoverrideissue/MyBundle.kt
  3. Notice the red highlighting for recent options; they come from the external dependency, but the IDE only resolves the one that's in the plugin's target IDE that's also in the dependencies
  4. Notice however that it compiles, because at compile time the classpath is resolved correctly, making the downloaded dependency take over the indirect one.

Gradle IntelliJ Plugin version

2.5.0

Gradle version

8.13

Operating System

macOS

Link to build, i.e. failing GitHub Action job

https://github.com/WarningImHack3r/serialization-override-issue

WarningImHack3r avatar Apr 01 '25 18:04 WarningImHack3r