IntelliJ IDEA lets you create, import and manage SBT projects.
Creating an SBT project
- Launch the New Project wizard. If no project is currently opened in IntelliJ IDEA, click Create New Project on the welcome screen: Otherwise, select from the main menu.
- Select Scala from the options on the left.
- From the options on the right, select SBT and click Next.
- On the next page of the wizard, specify your project's name, location, JDK along with SBT and Scala versions. The SBT and Scala versions are fetched automatically. Also, if you need, specify module information for your project. Click Finish.
Importing an SBT project
- Launch the New Project wizard. If no project is currently opened in IntelliJ IDEA, click Import Project on the welcome screen. Otherwise, select from the main menu.
Note that you can also select File | Open from the main menu and choose the
build.sbtfile or a directory containing the
build.sbtfile. IntelliJ IDEA will import an SBT project even if the project was not opened or imported before.
- In the dialog that opens, select the directory that contains the project you want to import or a file that contains a SBT project description (
build.sbt). Click OK.
- On the first page of the Import Project wizard, in Import Project from External model, select SBT and click Next.
(This page is not displayed if IntelliJ IDEA has guessed what you are importing.)
- On the next page of the Import Project wizard, IntelliJ IDEA displays general project information with default settings that you can change if you want. Usually the default settings are enough, but you can select the Use SBT shell for build and import (requires sbt 0.13.5+) option to delegate your project builds and imports to SBT.
Also, specify global SBT settings such as JVM,its options and the SBT launcher. Click Finish.