Separate main and test modules in sbt (beta)
There is a new, experimental mode of working with sbt projects in IntelliJ IDEA with the Scala Plugin. If enabled, it organizes main and test sources into separate modules, which improves compilation and dependency management.
Enable the separate modules mode
Press Ctrl+Alt+S to open settings and select
Check the box Create separate modules for main and test sources.
Click OK. The project will be reloaded automatically, and new modules will be created.
After the reload, each run configuration referencing a module should switch to the corresponding main or test module. In rare cases, changing the modules in the run configurations may not be possible automatically. If this happens, you can update the run configurations by explicitly using the Update Run Configurations to the new module naming scheme action.
Check out the article on our blog for more details and examples of how this new mode helps configure sbt projects.