-
Notifications
You must be signed in to change notification settings - Fork 31
/
build.sbt
93 lines (84 loc) · 3.03 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
lazy val commonSettings = Seq(
scalacOptions ++= commonScalacOptions,
scalaVersion := "2.12.15",
organization := "org.ergoplatform",
version := "9.17.8",
resolvers += Resolver.sonatypeRepo("public"),
resolvers += Resolver.sonatypeRepo("snapshots"),
libraryDependencies ++= dependencies.Testing ++ dependencies.CompilerPlugins,
ThisBuild / evictionErrorLevel := Level.Info,
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 => (assembly / assemblyMergeStrategy).value(other)
}
)
lazy val allConfigDependency = "compile->compile;test->test"
lazy val explorer = project
.in(file("."))
.withId("explorer-backend")
.settings(commonSettings)
.settings(moduleName := "explorer-backend", name := "ExplorerBackend")
.aggregate(core, httpApi, grabber, utxTracker, utxBroadcaster, migrator)
lazy val core = utils
.mkModule("explorer-core", "ExplorerCore")
.settings(commonSettings)
.settings(
libraryDependencies ++= dependencies.core
)
lazy val httpApi = utils
.mkModule("explorer-api", "ExplorerApi")
.settings(commonSettings)
.settings(
assembly / mainClass := Some("org.ergoplatform.explorer.http.api.Application"),
libraryDependencies ++= dependencies.api
)
.dependsOn(core)
lazy val grabber = utils
.mkModule("chain-grabber", "ChainGrabber")
.settings(commonSettings)
.settings(
assembly / mainClass := Some("org.ergoplatform.explorer.indexer.Application"),
libraryDependencies ++= dependencies.grabber
)
.dependsOn(core % allConfigDependency)
lazy val utxTracker = utils
.mkModule("utx-tracker", "UtxTracker")
.settings(commonSettings)
.settings(
assembly / mainClass := Some("org.ergoplatform.explorer.tracker.Application"),
libraryDependencies ++= dependencies.utxTracker
)
.dependsOn(core)
lazy val utxBroadcaster = utils
.mkModule("utx-broadcaster", "UtxBroadcaster")
.settings(commonSettings)
.settings(
assembly / mainClass := Some("org.ergoplatform.explorer.broadcaster.Application"),
libraryDependencies ++= dependencies.utxBroadcaster
)
.dependsOn(core)
lazy val migrator = utils
.mkModule("migrator", "Migrator")
.settings(commonSettings)
.settings(
assembly / mainClass := Some("org.ergoplatform.explorer.migration.Application")
)
.dependsOn(grabber, httpApi)
lazy val commonScalacOptions = List(
"-deprecation",
"-encoding",
"UTF-8",
"-language:higherKinds",
"-language:postfixOps",
"-language:implicitConversions",
"-feature",
"-unchecked",
"-Xfuture",
"-Yno-adapted-args",
"-Ypartial-unification"
)