Skip to content

Instantly share code, notes, and snippets.

@matfournier
Created January 29, 2019 03:54
Show Gist options
  • Save matfournier/cee7e147c848ec48dbfc3f66ccffc068 to your computer and use it in GitHub Desktop.
Save matfournier/cee7e147c848ec48dbfc3f66ccffc068 to your computer and use it in GitHub Desktop.
simple scala starter
name := "XXX"
version := "0.1"
scalaVersion := "2.12.7"
val circeVersion = "0.9.3"
libraryDependencies ++= Seq(
"io.circe" %% "circe-core",
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser"
).map(_ % circeVersion)
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.5" % "test"
libraryDependencies +=
"org.typelevel" %% "cats-core" % "1.0.0"
scalacOptions ++= Seq(
// "-Xfatal-warnings",
"-Ypartial-unification"
)
libraryDependencies += "com.softwaremill.sttp" %% "core" % "1.2.3"
libraryDependencies += "com.softwaremill.sttp" %% "circe" % "1.2.3"
libraryDependencies += "com.softwaremill.sttp" %% "async-http-client-backend-monix" % "1.2.3"
libraryDependencies += "io.monix" %% "monix" % "3.0.0-RC1"
addCompilerPlugin(
"org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full
)
//trapExit := false
package com.mfournier.pbp.example
class Example {
def square(x: Int): Int = x * x
}
package com.mfournier.pbp.example
import org.scalatest.FunSpec
import org.scalatest.Matchers._
class ExampleTest extends FunSpec {
describe("Example") {
val example = new Example
it("Should square") {
example.square(5) shouldBe 25
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment