forked from xebia-functional/Unwrapped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
155 lines (132 loc) · 4.11 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
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
import Dependencies.Compile._
import Dependencies.Test._
import scala.collection.JavaConverters._
import com.fasterxml.jackson.dataformat.csv.CsvSchema
import com.fasterxml.jackson.dataformat.csv.CsvMapper
import com.fasterxml.jackson.dataformat.csv.CsvParser
ThisBuild / scalaVersion := "3.1.2"
ThisBuild / organization := "com.47deg"
ThisBuild / versionScheme := Some("early-semver")
addCommandAlias("ci-test", "scalafmtCheckAll; scalafmtSbtCheck; github; mdoc; test")
addCommandAlias("ci-docs", "github; mdoc")
addCommandAlias("ci-publish", "github; ci-release")
publish / skip := true
lazy val root =
(project in file("./")).aggregate(
`scala-fx`,
benchmarks,
`munit-scala-fx`,
`scalike-jdbc-scala-fx`,
`http-scala-fx`,
documentation,
`sttp-scala-fx`,
`java-net-multipart-body-publisher`
)
lazy val `scala-fx` = project.settings(scalafxSettings: _*)
lazy val benchmarks =
project.dependsOn(`scala-fx`).settings(publish / skip := true).enablePlugins(JmhPlugin)
lazy val documentation = project
.dependsOn(`scala-fx`)
.enablePlugins(MdocPlugin)
.settings(mdocOut := file("."))
.settings(publish / skip := true)
lazy val `munit-scala-fx` = (project in file("./munit-scalafx"))
.configs(IntegrationTest)
.settings(
munitScalaFXSettings
)
.dependsOn(`scala-fx`)
lazy val `cats-scala-fx` = (project in file("./cats-scalafx"))
.configs(IntegrationTest)
.settings(
catsScalaFXSettings
)
.dependsOn(`scala-fx`)
lazy val `scalike-jdbc-scala-fx` = project
.dependsOn(`scala-fx`, `munit-scala-fx` % "test -> compile")
.settings(publish / skip := true)
.settings(scalalikeSettings)
lazy val `java-net-multipart-body-publisher` =
(project in file("./java-net-mulitpart-body-publisher")).settings(commonSettings)
lazy val `http-scala-fx` = (project in file("./http-scala-fx"))
.settings(httpScalaFXSettings)
.settings(generateMediaTypeSettings)
.dependsOn(
`java-net-multipart-body-publisher`,
`scala-fx`,
`munit-scala-fx` % "test -> compile")
.enablePlugins(HttpScalaFxPlugin)
lazy val `sttp-scala-fx` = (project in file("./sttp-scala-fx"))
.settings(sttpScalaFXSettings)
.dependsOn(
`java-net-multipart-body-publisher`,
`scala-fx`,
`http-scala-fx`,
`munit-scala-fx` % "test -> compile")
lazy val commonSettings = Seq(
javaOptions ++= javaOptionsSettings,
autoAPIMappings := true,
Test / fork := true
)
lazy val scalafxSettings: Seq[Def.Setting[_]] =
Seq(
classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat,
javaOptions ++= javaOptionsSettings,
autoAPIMappings := true,
libraryDependencies ++= Seq(
scalacheck % Test
)
)
lazy val munitScalaFXSettings = Defaults.itSettings ++ Seq(
libraryDependencies ++= Seq(
munitScalacheck,
hedgehog,
junit,
munit,
junitInterface
)
) ++ commonSettings
lazy val catsScalaFXSettings = Seq(
classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat,
javaOptions ++= javaOptionsSettings,
autoAPIMappings := true,
libraryDependencies ++= Seq(
catsEffect,
scalacheck % Test
)
)
lazy val scalalikeSettings: Seq[Def.Setting[_]] =
Seq(
classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat,
javaOptions ++= javaOptionsSettings,
autoAPIMappings := true,
libraryDependencies ++= Seq(
scalikejdbc,
h2Database,
logback,
postgres,
scalacheck % Test,
testContainers % Test,
testContainersMunit % Test,
testContainersPostgres % Test,
flyway % Test
)
)
lazy val httpScalaFXSettings = commonSettings
lazy val sttpScalaFXSettings = commonSettings ++ Seq(
libraryDependencies += sttp,
libraryDependencies += httpCore5,
libraryDependencies += hedgehog % Test
)
lazy val javaOptionsSettings = Seq(
"-XX:+IgnoreUnrecognizedVMOptions",
"-XX:-DetectLocksInCompiledFrames",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseNewCode",
"--add-modules=java.base",
"--add-modules=jdk.incubator.concurrent",
"--add-opens java.base/jdk.internal.vm=ALL-UNNAMED",
"--add-exports java.base/jdk.internal.vm=ALL-UNNAMED",
"--enable-preview"
)