-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
108 lines (101 loc) · 4.16 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import sbt.Keys._
import sbt.file
val http4sVersion = "0.21.4"
val specs2Version = "4.10.3"
val slf4jVersion = "1.7.30"
val logbackVersion = "1.2.3"
val kindProjectorVersion = "0.11.0"
val enumeratumCirceVersion = "1.6.1"
val circeVersion = "0.13.0"
val ficusVersion = "1.5.0"
val akkaVersion = "2.6.13"
val doobieVersion = "0.9.0"
val pureConfigVersion = "0.12.3"
val flywayVersion = "7.7.0"
val scalaTestVersion = "3.1.1"
val scalaMockVersion = "4.4.0"
val h2Version = "1.4.200"
val `root` = project.in(file("."))
.enablePlugins(GuardrailPlugin)
.enablePlugins(WartRemover)
.enablePlugins(JavaAppPackaging, DockerPlugin)
.settings(
name := "catracker",
organization := "nl.pragmasoft.catracker",
scalaVersion := "2.13.3",
testOptions += Tests.Argument(TestFrameworks.JUnit, "-v"),
dockerBaseImage := "openjdk:11",
dockerUpdateLatest := true,
dockerExposedPorts ++= Seq(8081),
packageName in Docker := "catracker",
mainClass in Compile := Some("nl.pragmasoft.catracker.Main"),
version in Docker := version.value,
scalacOptions := Seq(
"-deprecation",
"-encoding", "UTF-8",
"-language:higherKinds",
"-language:postfixOps",
"-feature",
"-Xfatal-warnings"
),
packageOptions in(Compile, packageBin) +=
Package.ManifestAttributes(
"Build-Time" -> new java.util.Date().toString,
"Build-Commit" -> git.gitHeadCommit.value.getOrElse("No Git Revision Found")
),
sources in doc := Seq.empty,
publishArtifact in packageDoc := false,
resolvers += Resolver.bintrayRepo("cakesolutions", "maven"),
guardrailTasks in Compile := List(
ScalaServer(
file("api.yaml"),
pkg = "nl.pragmasoft.catracker.http",
framework = "http4s",
tracing = false),
ScalaClient(
file("api.yaml"),
pkg = "nl.pragmasoft.catracker.http.client",
framework = "http4s",
tracing = false
)
),
libraryDependencies ++= Seq(
compilerPlugin("org.typelevel" % "kind-projector_2.13.1" % kindProjectorVersion),
"org.http4s" %% "http4s-blaze-server" % http4sVersion,
"org.http4s" %% "http4s-blaze-client" % http4sVersion,
"org.http4s" %% "http4s-circe" % http4sVersion,
"org.http4s" %% "http4s-dsl" % http4sVersion,
"commons-codec" % "commons-codec" % "1.9",
"org.http4s" %% "http4s-prometheus-metrics" % http4sVersion,
"com.h2database" % "h2" % h2Version,
"mysql" % "mysql-connector-java" % "8.0.23",
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-generic-extras" % circeVersion,
"org.flywaydb" % "flyway-core" % flywayVersion,
"com.typesafe.akka" %% "akka-cluster-typed" % akkaVersion,
"com.typesafe.akka" %% "akka-actor-typed" % akkaVersion,
"com.typesafe.akka" %% "akka-actor-testkit-typed" % akkaVersion % Test,
"com.typesafe.akka" %% "akka-persistence-typed" % akkaVersion,
("com.github.dnvriend" %% "akka-persistence-inmemory" % "2.5.15.2")
.exclude("com.typesafe.akka", "akka-actor")
.exclude("com.typesafe.akka", "akka-persistence")
.exclude("com.typesafe.akka", "akka-persistence-query")
.exclude("com.typesafe.akka", "akka-stream")
.exclude("com.typesafe.akka", "akka-protobuf"),
"com.beachape" %% "enumeratum-circe" % enumeratumCirceVersion,
"ch.qos.logback" % "logback-classic" % logbackVersion,
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
"com.github.pureconfig" %% "pureconfig" % pureConfigVersion,
"com.github.pureconfig" %% "pureconfig-cats-effect" % pureConfigVersion,
"org.tpolecat" %% "doobie-core" % doobieVersion,
"org.tpolecat" %% "doobie-hikari" % doobieVersion,
"org.tpolecat" %% "doobie-h2" % doobieVersion % Test,
"org.tpolecat" %% "doobie-specs2" % doobieVersion % Test,
"org.http4s" %% "http4s-testing" % http4sVersion % Test,
"org.scalatest" %% "scalatest" % scalaTestVersion % Test,
"org.scalamock" %% "scalamock" % scalaMockVersion % Test
)
)