mkdir -p src/{main,test}/scala
mkdir -p project
touch build.sbt
echo 'name := "test-app"' >> build.sbt
echo '' >> build.sbt
echo 'version := "1.0"' >> build.sbt
echo '' >> build.sbt
echo 'scalaVersion := "2.11.7"' >> build.sbt
echo '' >> build.sbt
touch project/build.properties
echo 'sbt.version=0.13.8' >> project/build.properties
$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
$ brew install sbt
$ sbt sbtVersion
$ brew install scala
$ scala -version
Scala code runner version 2.11.6 -- Copyright 2002-2013, LAMP/EPFL
$ ls -al ~/.ivy2/cache
Implement multiply
function without using the *
operator.
echo 'libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.6" % "test"' >> build.sbt
echo '' >> build.sbt
mkdir -p src/test/scala/com/netaporter
touch MultiplicationSpec.scala
You can check final content of the test file here
mkdir -p src/main/scala/com/netaporter
touch Multiplication.scala
You can check final content of the Multiplication.scala here
$ brew install typesafe-activator
$ activator new my-project-name
Fetching the latest list of templates...
Browse the list of templates: http://typesafe.com/activator/templates
Choose from these featured templates or enter a template name:
1) minimal-akka-java-seed
2) minimal-akka-scala-seed
3) minimal-java
4) minimal-scala
5) play-java
6) play-scala
(hit tab to see a list of all templates)
>