-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
62 lines (48 loc) · 1.91 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
name := "api-example"
version := "0.1"
scalaVersion := "2.13.1"
envVars in Test := Map("SCALA_ENV" -> "test")
fork in Test := true
val doobieVersion = "0.8.8"
val http4sVersion = "0.21.0"
val circeVersion = "0.13.0"
val jwtVersion = "4.2.0"
libraryDependencies ++= Seq(
"com.pauldijou" %% "jwt-core" % jwtVersion,
"com.pauldijou" %% "jwt-circe" % jwtVersion,
"org.http4s" %% "http4s-circe" % http4sVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-literal" % circeVersion,
"org.tpolecat" %% "doobie-core" % doobieVersion,
"org.tpolecat" %% "doobie-postgres" % doobieVersion,
"org.tpolecat" %% "doobie-specs2" % doobieVersion,
"org.http4s" %% "http4s-dsl" % http4sVersion,
"org.http4s" %% "http4s-blaze-server" % http4sVersion,
"org.http4s" %% "http4s-blaze-client" % http4sVersion,
"org.slf4j" % "slf4j-simple" % "1.6.4",
"org.jooq" % "jooq" % "3.13.1",
"io.lemonlabs" %% "scala-uri" % "2.0.0",
"org.scalatest" %% "scalatest" % "3.1.0" % "test"
)
coverageEnabled := true
coverageHighlighting := true
Test / parallelExecution := false
/* FLYWAY CONFIG */
enablePlugins(FlywayPlugin)
val env = scala.util.Properties.envOrElse("SCALA_ENV", "")
val postgresDatabase = env match {
case "test" => scala.util.Properties.envOrElse("API_POSTGRES_TEST_DATABASE", "http4s_api_test")
case _ => scala.util.Properties.envOrElse("API_POSTGRES_DATABASE", "http4s_api")
}
val postgresUser = env match {
case "test" => scala.util.Properties.envOrElse("API_POSTGRES_TEST_USER", "postgres")
case _ => scala.util.Properties.envOrElse("API_POSTGRES_USER", "postgres")
}
val postgresPass = env match {
case "test" => scala.util.Properties.envOrElse("API_POSTGRES_TEST_PASS", "")
case _ => scala.util.Properties.envOrElse("API_POSTGRES_PASS", "")
}
flywayUrl := s"jdbc:postgresql:${postgresDatabase}"
flywayUser := postgresUser
flywayPassword := postgresPass
flywayLocations += "db/migration"