-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
107 lines (88 loc) · 3.46 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
name := "macwire-autowire"
version := "0.1"
scalaVersion := "2.13.7"
import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings
import sbt._
import Keys._
val doobieVersion = "1.0.0-RC1"
val http4sVersion = "0.23.7"
val circeVersion = "0.14.1"
val tsecVersion = "0.4.0"
val sttpVersion = "3.3.18"
val prometheusVersion = "0.14.1"
val tapirVersion = "0.20.0-M3"
val macwireVersion = "2.5.6"
val dbDependencies = Seq(
"org.tpolecat" %% "doobie-core" % doobieVersion,
"org.tpolecat" %% "doobie-hikari" % doobieVersion,
"org.tpolecat" %% "doobie-postgres" % doobieVersion
)
val httpDependencies = Seq(
"org.http4s" %% "http4s-dsl" % http4sVersion,
"org.http4s" %% "http4s-blaze-server" % http4sVersion,
"org.http4s" %% "http4s-blaze-client" % http4sVersion,
"org.http4s" %% "http4s-circe" % http4sVersion,
"org.http4s" %% "http4s-prometheus-metrics" % http4sVersion,
"com.softwaremill.sttp.client3" %% "http4s-backend" % sttpVersion,
"com.softwaremill.sttp.client3" %% "slf4j-backend" % sttpVersion,
"com.softwaremill.sttp.tapir" %% "tapir-http4s-server" % tapirVersion
)
val monitoringDependencies = Seq(
"io.prometheus" % "simpleclient" % prometheusVersion,
"io.prometheus" % "simpleclient_hotspot" % prometheusVersion,
"com.softwaremill.sttp.client3" %% "prometheus-backend" % sttpVersion
)
val jsonDependencies = Seq(
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % tapirVersion,
"com.softwaremill.sttp.client3" %% "circe" % sttpVersion
)
val loggingDependencies = Seq(
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.4",
"ch.qos.logback" % "logback-classic" % "1.2.9",
"org.codehaus.janino" % "janino" % "3.1.6",
"de.siegmar" % "logback-gelf" % "4.0.2"
)
val configDependencies = Seq(
"com.github.pureconfig" %% "pureconfig" % "0.17.1",
"com.github.pureconfig" %% "pureconfig-cats-effect" % "0.17.1"
)
val baseDependencies = Seq(
"org.typelevel" %% "cats-effect" % "3.3.0",
"com.softwaremill.common" %% "tagging" % "2.3.2",
"com.softwaremill.quicklens" %% "quicklens" % "1.8.2"
)
val apiDocsDependencies = Seq(
"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % tapirVersion
)
val macwireDependencies = Seq(
"com.softwaremill.macwire" %% "macros" % macwireVersion,
"com.softwaremill.macwire" %% "macrosautocats" % macwireVersion
).map(_ % Provided)
val scalatest = "org.scalatest" %% "scalatest" % "3.2.10" % Test
val commonDependencies = baseDependencies ++ loggingDependencies ++ configDependencies
lazy val commonSettings = commonSmlBuildSettings ++ Seq(
organization := "com.softwaremill.autowire",
scalaVersion := "2.13.7",
libraryDependencies ++= commonDependencies,
)
def haltOnCmdResultError(result: Int) {
if (result != 0) {
throw new Exception("Build failed.")
}
}
def now(): String = {
import java.text.SimpleDateFormat
import java.util.Date
new SimpleDateFormat("yyyy-MM-dd-hhmmss").format(new Date())
}
lazy val rootProject = (project in file("."))
.settings(commonSettings)
.settings(
name := "autowire"
).settings(
libraryDependencies ++= dbDependencies ++ httpDependencies ++ jsonDependencies ++ apiDocsDependencies ++ monitoringDependencies ++ macwireDependencies,
Compile / mainClass := Some("com.softwaremill.macwire.autowire.Main")
)