I am using the SBT plugin in IntelliJ for my Scala projects. When importing the project (build.sbt) IntelliJ creates two Modules. One Scala Module for the project itself and one Module which is suffixed "-build" which is the build definition project. In the build definition project, it is sort of assumed that your scala code is in the root, i.e. in Build.scala (as described here: http://www.scala-sbt.org/release/docs/Getting-Started/Full-Def.html). However, since I write code in the Module i'd prefer a proper project structure with packages (src/main/scala/me/package) which can also be tested with unit tests in (src/test/scala/me/package). The problem is that IntelliJ always makes the project (root) folder as Source folder in the "-build" Module, rather than src/main/scala. When I change this manually, it gets reverted. With the project folder being a Source folder in the Module instead, IntelliJ complains about improper packages in my Scala source files. Also I cannot run unit tests from the IDE properly.
Is there any way to solve this? I understand that most people probably just dump a Build.scala file in the project folder but this can also be a "full" SBT project with proper source folders.