Is there a difference between running a Kotlin jvm...
# intellij
j
Is there a difference between running a Kotlin jvmTest gradle task in Intellij and in the terminal? In Intellij I got a NoSuchMethod exception when running the jvmTest but in terminal the same jvmTest task works fine. I have configured the IDE to run with Gradle, and the in IDE task fails with same exception with both Gradle and Intellij IDEA runner. (Same code runs however also fine on JS and Native in the IDE) I have run gradle clean and cleanBuildCache, restarted gradle workers, invalidated IDE caches and all to no success. I work with Kotlin 1.6.0 in both the project and IDE plugin, but also encountered this issue in 1.5.31 and possibly even before. For those who want to try it out, I have the issue on the branch linked below and keep getting this NoSuchMethod exception on same method regularly with all kinds of random unrelated changes which I then work around. So the project probably hits some kind of a limit somewhere with the JVM compiler. (It works consistently fine on one commit before on that branch) https://github.com/marykdb/maryk/tree/method-missing-crash If somebody can provide some extra hints I could post a proper issue report.
m
Maybe your jvm version is not the same on the command line?
j
You are totally right! Somehow I made the assumption that the in IDE terminal always used the Project SDK like how it switches with the tests. 🤦 It is a JDK 17 issue. Thanks!
👍 1