So what is Sbt ?
So is an open source build tool for scala like ant or maven, where plugins are imported by maven format repositories, which provides features like compiling Scala code and integrating with many Scala test frameworks,Continuous compilation, testing, and deployment,Dependency management etc.!!
This tutorial will help you to install Scala and Sbt(Scala build tool), write a hello world program in shell and create a basic sbt project.
Installing scala build tool
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823 sudo apt-get update sudo apt-get install sbt
sudo apt-get update sudo apt-get install scala
Basic Hello world Program in scala shell
- Lets open scala shell by typing below command
- We shall print hell world from scala shell
- Quit the The Scala shell
hello world project using Scala build tool
sbt new scala/hello-world.g8
2.provide the name to project when prompted.
3.open the project in suitable Ide
4.run the main.scala function