IntelliJ IDEA cannot reuse classes created by other build systems because it has its own incremental compiler that tracks dependencies and creates caches at compile time so that it can only compile changed and dependent files when you make changes to the code. When you built using SBT / Maven / Gradle or the javac command line, the IntelliJ IDEA compiler cache does not know what has changed and what files it should compile, so it performs a complete rebuild.
The solution is to use different output directories for the IDE and SBT, so IntelliJ IDEA will only rebuild files that have changed since the last build in the IDE, and your build of the SBT for the command line will not result in rebuild in the IDE.
sbt-ide-settings .
plugins.sbt ( , ):
resolvers += Resolver.url("jetbrains-bintray",url("http://dl.bintray.com/jetbrains/sbt-plugins/"))(Resolver.ivyStylePatterns)
addSbtPlugin("org.jetbrains" % "sbt-ide-settings" % "0.1.2")
IDE build.sbt:
ideOutputDirectory in Compile := Some(new File("target/idea/classes"))
ideOutputDirectory in Test := Some(new File("target/idea/test-classes"))
.