-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sbt
More file actions
164 lines (140 loc) · 4.76 KB
/
Copy pathbuild.sbt
File metadata and controls
164 lines (140 loc) · 4.76 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
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 :+ "-Ypartial-unification"
case Some((2, 13)) => scalacCompilerOptions :+ s"-release:$javacCompilerVersion"
case _ => Seq.empty
}
}
)
ThisBuild / organization := "app.softnetwork"
name := "payment"
ThisBuild / version := "0.9.11"
ThisBuild / scalaVersion := scala212
ThisBuild / javacOptions ++= Seq("-source", javacCompilerVersion, "-target", javacCompilerVersion, "-Xlint")
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 / libraryDependencySchemes ++= Seq(
"app.softnetwork.notification" %% "notification-common" % VersionScheme.Always,
"app.softnetwork.notification" %% "notification-core" % VersionScheme.Always,
"app.softnetwork.notification" %% "notification-testkit" % VersionScheme.Always
)
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" % "2.4.0",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.11.0",
"org.slf4j" % "slf4j-api" % Versions.slf4j,
"ch.qos.logback" % "logback-classic" % Versions.logback
) ++ scalatest
ThisBuild / libraryDependencySchemes ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always,
"org.scala-lang.modules" %% "scala-parser-combinators" % 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 client = project.in(file("client"))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
app.softnetwork.Info.infoSettings,
moduleSettings
)
.enablePlugins(BuildInfoPlugin, AkkaGrpcPlugin, JavaAppPackaging, UniversalDeployPlugin)
lazy val common = project.in(file("common"))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
moduleSettings
)
.enablePlugins(AkkaGrpcPlugin)
.dependsOn(
client % "compile->compile;test->test;it->it"
)
lazy val core = project.in(file("core"))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
app.softnetwork.Info.infoSettings,
moduleSettings
)
.enablePlugins(BuildInfoPlugin, AkkaGrpcPlugin)
.dependsOn(
common % "compile->compile;test->test;it->it"
)
lazy val mangopay = project.in(file("mangopay"))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
moduleSettings
)
.dependsOn(
core % "compile->compile;test->test;it->it"
)
lazy val stripe = project.in(file("stripe"))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
moduleSettings
)
.dependsOn(
core % "compile->compile;test->test;it->it"
)
lazy val api = project.in(file("api"))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
moduleSettings
)
.enablePlugins(DockerComposePlugin, DockerPlugin, JavaAppPackaging)
.dependsOn(
mangopay % "compile->compile;test->test;it->it"
)
.dependsOn(
stripe % "compile->compile;test->test;it->it"
)
lazy val testkit = project.in(file("testkit"))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
moduleSettings
)
.dependsOn(
mangopay % "compile->compile;test->test;it->it"
)
.dependsOn(
stripe % "compile->compile;test->test;it->it"
)
lazy val root = project.in(file("."))
.aggregate(client, common, core, mangopay, stripe, testkit, api)
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
crossScalaVersions := Nil
)