forked from trace4cats/trace4cats-sttp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
74 lines (68 loc) · 2.41 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
lazy val commonSettings = Seq(
Compile / compile / javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) =>
Seq(compilerPlugin(Dependencies.kindProjector), compilerPlugin(Dependencies.betterMonadicFor))
case _ => Seq.empty
}
},
scalacOptions += {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => "-Wconf:any:wv"
case _ => "-Wconf:any:v"
}
},
Test / fork := true,
resolvers += Resolver.sonatypeRepo("releases"),
)
lazy val noPublishSettings =
commonSettings ++ Seq(publish := {}, publishArtifact := false, publishTo := None, publish / skip := true)
lazy val publishSettings = commonSettings ++ Seq(
publishMavenStyle := true,
pomIncludeRepository := { _ =>
false
},
Test / publishArtifact := false
)
lazy val root = (project in file("."))
.settings(noPublishSettings)
.settings(name := "Trace4Cats Sttp")
.aggregate(`sttp-client3`, `sttp-common`, `sttp-tapir`)
lazy val `sttp-client3` = (project in file("modules/sttp-client3"))
.settings(publishSettings)
.settings(
name := "trace4cats-sttp-client3",
libraryDependencies ++= Seq(
Dependencies.trace4catsContextUtils,
Dependencies.trace4catsCore,
Dependencies.sttpClient3
),
libraryDependencies ++= Seq(Dependencies.http4sDsl, Dependencies.sttpClient3Http4s).map(_ % Test)
)
.dependsOn(`sttp-common` % "compile->compile;test->test")
lazy val `sttp-common` = (project in file("modules/sttp-common"))
.settings(publishSettings)
.settings(
name := "trace4cats-sttp-common",
libraryDependencies ++= Seq(Dependencies.trace4catsKernel, Dependencies.sttpModel),
libraryDependencies ++= Seq(
Dependencies.trace4catsTestkit,
Dependencies.trace4catsContextUtils,
Dependencies.trace4catsCore
).map(_ % Test)
)
lazy val `sttp-tapir` = (project in file("modules/sttp-tapir"))
.settings(publishSettings)
.settings(
name := "trace4cats-sttp-tapir",
libraryDependencies ++= Seq(Dependencies.trace4catsCore, Dependencies.sttpTapirCats),
libraryDependencies ++= Seq(
Dependencies.http4sClient,
Dependencies.http4sDsl,
Dependencies.sttpTapirJsonCirce,
Dependencies.sttpTapirHttp4s,
Dependencies.logback
).map(_ % Test)
)
.dependsOn(`sttp-common` % "compile->compile;test->test")