Łukasz Lew Łukasz Lew - 1 year ago 134
Scala Question

Scala simple dummy project

Currently my whole work cycle is:

  1. edit foo.scala

  2. fsc foo.scala && scala -cp . FooMain

But my project is getting bigger and I would like to split files, make unit tests, etc.
But I'm too lazy for reading sbt documentation and doing whatever needs to be done to get a sbt's "Makefile". Similarly for unit tests (there are so many frameworks, which to choose?)

What would make my day is a simple zipped dummy project with a dummy unit tests using sbt.

Do you know whether such thing exists?

Answer Source

Well, you should use SBT. You don't need to write anything for it: it will create everything you need for a basic project, and only ask you what is the project name and what version of Scala you'll be using.

After that, just put the files in the correct places. Look up the directory layout, though the short answer is main source files in src/main/scala and test source files in src/test/scala. You will have to create a very small "makefile" to get a test library in, though.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download