-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
129 lines (108 loc) · 3.87 KB
/
Copy pathbuild.sbt
File metadata and controls
129 lines (108 loc) · 3.87 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
lazy val scala212 = "2.12.20"
lazy val scala213 = "2.13.16"
lazy val javacCompilerVersion = "17"
lazy val scalacCompilerOptions = Seq("-deprecation", "-feature")
lazy val moduleSettings = Seq(
crossScalaVersions := Seq(scala212, scala213),
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 12)) => scalacCompilerOptions
case Some((2, 13)) => scalacCompilerOptions :+ s"-release:$javacCompilerVersion"
case _ => Seq.empty
}
}
)
ThisBuild / organization := "app.softnetwork"
name := "notification"
ThisBuild / version := "0.9.3"
ThisBuild / scalaVersion := scala212
ThisBuild / javacOptions ++= Seq("-source", javacCompilerVersion, "-target", javacCompilerVersion)
ThisBuild / resolvers ++= Seq(
"Softnetwork Server" at "https://softnetwork.jfrog.io/artifactory/releases/",
"Softnetwork snapshots" at "https://softnetwork.jfrog.io/artifactory/snapshots/",
"Maven Central Server" at "https://repo1.maven.org/maven2",
"Typesafe Server" at "https://repo.typesafe.com/typesafe/releases"
)
ThisBuild / versionScheme := Some("early-semver")
val scalatest = Seq(
"org.scalatest" %% "scalatest" % Versions.scalatest % Test
)
ThisBuild / libraryDependencies ++= Seq(
"com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % "protobuf",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.11.0",
"org.apache.commons" % "commons-lang3" % "3.15.0",
"org.slf4j" % "slf4j-api" % Versions.slf4j,
"ch.qos.logback" % "logback-classic" % Versions.logback,
) ++ scalatest
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
ThisBuild / javaOptions ++= Seq(
"--add-opens=java.base/java.util=ALL-UNNAMED",
"--add-opens=java.base/java.util.concurrent=ALL-UNNAMED",
"--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.lang.invoke=ALL-UNNAMED",
"--add-opens=java.base/java.math=ALL-UNNAMED",
"--add-opens=java.base/java.io=ALL-UNNAMED",
"--add-opens=java.base/java.net=ALL-UNNAMED",
"--add-opens=java.base/java.nio=ALL-UNNAMED",
"--add-opens=java.base/java.text=ALL-UNNAMED",
"--add-opens=java.base/java.time=ALL-UNNAMED",
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
)
ThisBuild / Test / fork := true
ThisBuild / Test / javaOptions ++= (ThisBuild / javaOptions).value
Test / parallelExecution := false
lazy val common = project.in(file("common"))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
moduleSettings
)
.enablePlugins(AkkaGrpcPlugin)
// Story 13.9 — dependency-light metrics module (only the Prometheus client). Kept separate from
// common so downstream consumers can depend on notification metrics without the full common stack.
lazy val metrics = project.in(file("metrics"))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
moduleSettings
)
lazy val core = project.in(file("core"))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
app.softnetwork.Info.infoSettings,
moduleSettings
)
.enablePlugins(BuildInfoPlugin)
.dependsOn(
common % "compile->compile;test->test;it->it",
metrics
)
lazy val testkit = project.in(file("testkit"))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
moduleSettings
)
.enablePlugins(BuildInfoPlugin)
.dependsOn(
core % "compile->compile;test->test;it->it"
)
lazy val api = project.in(file("api"))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
moduleSettings
)
.enablePlugins(DockerPlugin, JavaAppPackaging)
.dependsOn(
core % "compile->compile;test->test;it->it"
)
lazy val root = project.in(file("."))
.aggregate(common, metrics, core, testkit, api)
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
crossScalaVersions := Nil
)