-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
81 lines (76 loc) · 2.5 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
import Dependencies._
import sbt.Keys.organization
lazy val commonSettings = Seq(
scalaVersion := "2.13.6",
organization := "io.ergolabs",
version := "0.8.5",
scalacOptions ++= commonScalacOption,
libraryDependencies ++= List(CompilerPlugins.betterMonadicFor, CompilerPlugins.kindProjector),
assembly / test := {},
assembly / assemblyMergeStrategy := {
case "logback.xml" => MergeStrategy.first
case "module-info.class" => MergeStrategy.discard
case other if other.contains("scala/annotation/nowarn.class") => MergeStrategy.first
case other if other.contains("scala/annotation/nowarn$.class") => MergeStrategy.first
case other if other.contains("io.netty.versions") => MergeStrategy.first
case other => (assemblyMergeStrategy in assembly).value(other)
}
)
lazy val commonScalacOption = List(
"-Ymacro-annotations",
"-Yrangepos",
"-Wconf:cat=unused:info",
"-language:implicitConversions",
"-feature"
)
lazy val explorerBackend = project
.in(file("."))
.withId("cardano-explorer-backend")
.settings(commonSettings)
.settings(name := "cardano-explorer-backend")
.aggregate(core, api)
lazy val core =
(project in file("modules/core"))
.settings(commonSettings)
.settings(
name := "explorer-core",
libraryDependencies ++= List(
Libraries.tofuCore,
Libraries.tofuDerivation,
Libraries.tofuDoobie,
Libraries.tofuLogging,
Libraries.tofuFs2,
Libraries.derevoCatsTagless,
Libraries.doobiePg,
Libraries.newtype,
Libraries.mouse,
Libraries.tapirCore,
Libraries.tapirCirce,
Libraries.derevoCirce,
Libraries.enumeratum,
Libraries.enumeratumCirce
)
)
lazy val api =
(project in file("modules/api"))
.settings(commonSettings)
.settings(
name := "explorer-api",
libraryDependencies ++= List(
Libraries.tofuConcurrent,
Libraries.tofuOptics,
Libraries.tofuStreams,
Libraries.tofuZio,
Libraries.doobieHikari,
Libraries.http4sServer,
Libraries.tapirCirce,
Libraries.tapirHttp4s,
Libraries.tapirRedoc,
Libraries.tapirDocs,
Libraries.tapirOpenApi,
Libraries.derevoPureconfig,
Libraries.pureconfig
)
)
.dependsOn(core)
.enablePlugins(JavaAppPackaging, UniversalPlugin, DockerPlugin)