-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
117 lines (97 loc) · 3.46 KB
/
build.sbt
File metadata and controls
117 lines (97 loc) · 3.46 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
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 := "account"
ThisBuild / version := "0.8.1"
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 / 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.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)
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"
)
lazy val testkit = project.in(file("testkit"))
.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(
core % "compile->compile;test->test;it->it"
)
lazy val root = project.in(file("."))
.aggregate(common, core, testkit, api)
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
crossScalaVersions := Nil
)