-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
162 lines (146 loc) · 5.21 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
156
157
158
159
160
161
162
ThisBuild / tlBaseVersion := "1.0"
ThisBuild / tlCiHeaderCheck := false
ThisBuild / tlUntaggedAreSnapshots := true
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / organization := "pl.iterators"
ThisBuild / organizationName := "Iterators"
ThisBuild / startYear := Some(2024)
ThisBuild / licenses := Seq(License.Apache2)
ThisBuild / developers := List(
tlGitHubDev("luksow", "Łukasz Sowa")
)
ThisBuild / sonatypeCredentialHost := xerial.sbt.Sonatype.sonatypeLegacy
val Scala213 = "2.13.16"
val Scala3 = "3.3.3"
ThisBuild / crossScalaVersions := Seq(Scala213, Scala3)
ThisBuild / scalaVersion := Scala213
scalacOptions += "-Xmax-inlines:64"
// TODO: add -Yretain-trees to scalacOptions to enable magnolia features
lazy val baklava = tlCrossRootProject.aggregate(core, openapi, pekkohttp, pekkohttproutes, http4s, specs2, scalatest, munit, sbtplugin)
val swaggerV = "2.2.27"
val swaggerParserV = "2.1.24"
val pekkoHttpV = "1.1.0"
val pekkoV = "1.1.2"
val kebsV = "2.1.0"
val circeV = "0.14.0"
val specs2V = "4.20.9"
val scalatestV = "3.2.19"
val munitV = "1.0.2"
val http4sV = "0.23.29"
val reflectionsV = "0.10.2"
val magnoliaS2V = "1.1.10"
val magnoliaS3V = "1.3.8"
val enumeratumV = "1.7.5"
val pekkoHttpJsonV = "3.0.0"
val testcontainersV = "0.41.8"
val webjarsLocatorV = "0.52"
val swaggerUiV = "5.17.11"
val typesafeConfigV = "1.4.3"
lazy val core = project
.in(file("core"))
.settings(
name := "baklava-core",
libraryDependencies ++= Seq(
"pl.iterators" %% "kebs-core" % kebsV,
"org.reflections" % "reflections" % reflectionsV,
"pl.iterators" %% "kebs-circe" % kebsV,
"io.circe" %% "circe-parser" % circeV,
if (scalaVersion.value.startsWith("3")) "com.softwaremill.magnolia1_3" %% "magnolia" % magnoliaS3V
else "com.softwaremill.magnolia1_2" %% "magnolia" % magnoliaS2V
)
)
lazy val openapi = project
.in(file("openapi"))
.dependsOn(core, pekkohttp % "test", http4s % "test", scalatest % "test")
.settings(
name := "baklava-openapi",
libraryDependencies ++= Seq(
"io.swagger.core.v3" % "swagger-core" % swaggerV,
"io.swagger.parser.v3" % "swagger-parser" % swaggerParserV,
"com.beachape" %% "enumeratum" % enumeratumV % "test",
"pl.iterators" %% "kebs-enumeratum" % kebsV % "test",
"pl.iterators" %% "kebs-circe" % kebsV % "test",
"com.github.pjfanning" %% "pekko-http-circe" % pekkoHttpJsonV % "test",
"org.http4s" %% "http4s-ember-client" % http4sV % "test",
"org.http4s" %% "http4s-circe" % http4sV % "test",
"com.dimafeng" %% "testcontainers-scala-scalatest" % testcontainersV % "test"
)
)
lazy val pekkohttp = project
.in(file("pekkohttp"))
.dependsOn(core)
.settings(
name := "baklava-pekko-http",
libraryDependencies ++= Seq(
"org.apache.pekko" %% "pekko-http" % pekkoHttpV,
"org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpV,
"org.apache.pekko" %% "pekko-stream" % pekkoV
)
)
lazy val pekkohttproutes = project
.in(file("pekkohttproutes"))
.settings(
name := "baklava-pekko-http-routes",
libraryDependencies ++= {
Seq(
"org.apache.pekko" %% "pekko-stream" % pekkoHttpV,
"org.apache.pekko" %% "pekko-http" % pekkoHttpV,
"com.typesafe" % "config" % typesafeConfigV,
"org.webjars" % "webjars-locator" % webjarsLocatorV,
"io.swagger.core.v3" % "swagger-core" % swaggerV,
"io.swagger.parser.v3" % "swagger-parser" % swaggerParserV,
"org.webjars" % "swagger-ui" % swaggerUiV
)
}
)
lazy val http4s = project
.in(file("http4s"))
.dependsOn(core)
.settings(
name := "baklava-http4s",
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-dsl" % http4sV
)
)
lazy val specs2 = project
.in(file("specs2"))
.dependsOn(core)
.settings(
name := "baklava-specs2",
libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % specs2V
)
)
lazy val scalatest = project
.in(file("scalatest"))
.dependsOn(core)
.settings(
name := "baklava-scalatest",
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % scalatestV
)
)
lazy val munit = project
.in(file("munit"))
.dependsOn(core)
.settings(
name := "baklava-munit",
libraryDependencies ++= Seq(
"org.scalameta" %% "munit" % munitV
)
)
lazy val sbtplugin = project
.in(file("sbtplugin"))
.enablePlugins(SbtPlugin)
.settings(
name := "baklava-sbt-plugin",
scalaVersion := "2.12.17",
crossScalaVersions := Seq("2.12.17"),
pluginCrossBuild / sbtVersion := {
scalaBinaryVersion.value match {
case "2.12" => "1.3.10" // set minimum sbt version
}
}
)
Test / scalafmtOnCompile := true
ThisBuild / scalafmtOnCompile := true