2
votes

So Im learning Scala and using the Intellj IDE to make my projects with. When I click on New Project and then Scala I get the choice of

  1. Scala
  2. SBT

when i hoover the mouse over them I get additional info

  1. Sample module with attached Scala SDK
  2. SBT based Scala Project

Now I have played around with SBT before I downloaded Intellij and used it to compile and run some Scala code, so i kind of know what it is.

But I just don't know which one I should be choosing 1 or 2 and why someone would choose 1 over 2 or vise-versa?

2
Use SBT. Never use an IDEs built in build environment, this makes a project non-portable. There is never an excuse for not using an external build tool.Boris the Spider

2 Answers

2
votes

Use SBT project . This will lead to Intellij doing the autobuild using SBT wityhout you having to rework the build each time. The first time Intellij runs the sbt it will take some time to set itself up but eventually it will be far more rewarding. Also as mentioned by Boris for portability you would want a standard build/compile tool.

1
votes

I think there is not the solution to your problem. If you just want to try out Scala and the Scala SDK, the first choice is fine because you don't have any needs for an automated build. In my opinion is this your choice if you want to play around a bit without any overhead.

If you want to do a more real project I suggest to use sbt because it will build your project and manage your dependencies. This makes your project more flexible, easy to build for somebody else.