forked from vitorsvieira/akka-http-circe-json-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
68 lines (60 loc) · 2.48 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import sbt._
import Keys._
import com.typesafe.sbt.SbtScalariform
import de.heikoseeberger.sbtheader.license.Apache2_0
import scalariform.formatter.preferences._
import com.typesafe.sbt.SbtScalariform
licenses += ("Apache-2.0", url("http://opensource.org/licenses/apache2.0.php"))
headers := Map(
"scala" -> Apache2_0("2016", "Vitor Vieira"),
"conf" -> Apache2_0("2016", "Vitor Vieira", "#")
)
lazy val buildSettings = Seq(
version := "0.0.1",
scalaVersion := "2.12.0",
organization := "com.vitorsvieira",
scalacOptions ++= Seq("-unchecked", "-deprecation", "-encoding", "utf8", "-feature", "-language:higherKinds", "-language:implicitConversions", "-Ydelambdafy:method", "-target:jvm-1.8"),
resolvers ++= Seq(
"Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/",
Resolver.sonatypeRepo("snapshots"),
Resolver.sonatypeRepo("releases"),
Resolver.bintrayRepo("hseeberger", "maven")
)
)
val akkaV = "2.4.14"
val akkaHttpV = "10.0.0"
val akkaCors = "0.1.10"
val circeV = "0.6.1"
val scalaTestV = "3.0.1"
val akkaCirceV = "1.11.0"
val logbackV = "1.1.7"
lazy val `template` = project
.in(file("."))
.settings(buildSettings: _*)
.settings(mainClass in assembly := Some("com.vitorsvieira.http.server.ServerTemplate"))
.settings(
name := "akka-http-circe-json-template",
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-http" % akkaHttpV,
"com.typesafe.akka" %% "akka-slf4j" % akkaV,
"de.heikoseeberger" %% "akka-http-circe" % akkaCirceV,
"ch.megard" %% "akka-http-cors" % akkaCors,
"ch.qos.logback" % "logback-classic" % logbackV,
"io.circe" %% "circe-core" % circeV,
"io.circe" %% "circe-generic" % circeV,
"io.circe" %% "circe-jawn" % circeV,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpV % "test",
"org.scalatest" %% "scalatest" % scalaTestV % "test"
)
)
.enablePlugins(AutomateHeaderPlugin)
SbtScalariform.autoImport.scalariformPreferences := SbtScalariform.autoImport.scalariformPreferences.value
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(AlignSingleLineCaseStatements.MaxArrowIndent, 100)
.setPreference(DoubleIndentClassDeclaration, true)
.setPreference(RewriteArrowSymbols, true)
wartremoverWarnings ++= Warts.unsafe
//Test specific configuration
test in assembly := {}
parallelExecution in Test := false
fork in Test := true