I have scala projects configured with gradle as build tool. During development, I use IntelliJ with configured Scala plugin and Gradle plugin.
My question is why classes compiled by gradle from command line/terminal is not compatible with the one from IntelliJ (i.e. IntelliJ always try to recompile scala classes even if I don't modify anything and just run the test)?
This is a known bug with IntelliJ which does not look like it is possible to fix. The issue is that IntelliJ has an incremental compiler, and it is very difficult to incorporate externally compiled classes into its dependency graph, because the
scalac compiler doesn't produce the custom dependency graph info that IntelliJ uses.
(More info was at https://github.com/JetBrains/intellij-scala/issues/131 , now deleted)