-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
74 lines (66 loc) · 1.6 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
name := "sbt-monorepo-example"
organization := "lol"
scalaVersion := "2.13.8"
lazy val global = project
.in(file("."))
.settings(settings)
.disablePlugins(AssemblyPlugin)
.aggregate(
common,
foo,
bar
)
lazy val common = project
.settings(
name := "common",
settings,
libraryDependencies ++= commonDependencies
)
.disablePlugins(AssemblyPlugin)
lazy val foo = project
.settings(
name := "foo",
settings,
assemblySettings,
libraryDependencies ++= commonDependencies ++ Seq(
"com.typesafe.play" %% "play" % "2.8.13",
"com.typesafe.play" %% "play-test" % "2.8.13"
)
)
.dependsOn(common)
lazy val bar = project
.settings(
name := "bar",
settings,
assemblySettings,
libraryDependencies ++= commonDependencies ++ Seq(
// dependencies ...
)
)
.dependsOn(common)
lazy val commonDependencies = Seq(
"com.amazonaws" % "aws-java-sdk-core" % "1.12.184",
"org.scalatest" %% "scalatest" % "3.2.11" % "test"
)
lazy val settings = Seq(
scalacOptions ++= compilerOptions
// ...
)
lazy val compilerOptions = Seq(
"-deprecation",
"-feature",
"-unchecked",
"-language:implicitConversions",
"-language:higherKinds",
"-language:existentials",
"-language:postfixOps",
"-Ywarn-unused"
)
lazy val assemblySettings = Seq(
assembly / assemblyJarName := s"${name.value}.jar",
assembly / assemblyMergeStrategy := {
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case "application.conf" => MergeStrategy.concat
case _ => MergeStrategy.first
}
)