Repository navigation
Expand file tree
/
Copy pathbuild.sbt
More file actions
154 lines (137 loc) · 3.67 KB
/
Copy pathbuild.sbt
File metadata and controls
154 lines (137 loc) · 3.67 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
ThisBuild / scalaVersion := "3.7.4"
ThisBuild / organization := "dev.continuously.jing"
ThisBuild / licenses += ("MPL 2.0", url("https://opensource.org/licenses/MPL-2.0"))
ThisBuild / homepage := Some(url("https://github.com/TomasMikula/jing"))
ThisBuild / description := "Just Import 'N' Go: Spec-first APIs without codegen"
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/TomasMikula/jing"),
"scm:git:git@github.com:TomasMikula/jing.git"
)
)
ThisBuild / developers := List(
Developer(
id = "TomasMikula",
name = "Tomas Mikula",
email = "tomas.mikula@continuously.dev",
url = url("https://continuously.dev")
),
)
// Remove all additional repository other than Maven Central from POM
ThisBuild / pomIncludeRepository := { _ => false }
ThisBuild / publishMavenStyle := true
ThisBuild / publishTo := {
if (isSnapshot.value)
Some("central-snapshots" at "https://central.sonatype.com/repository/maven-snapshots/")
else
localStaging.value
}
import ReleaseTransformations._
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommand("publishSigned"),
releaseStepCommand("sonaRelease"),
setNextVersion,
commitNextVersion,
pushChanges,
)
val scalacOptionsCommon =
Seq(
"-deprecation",
"-Wunused:all",
"-Xkind-projector:underscores",
)
// ThisBuild / resolvers += Resolver.sonatypeCentralSnapshots
val LibrettoVersion = "0.3.9"
val Http4sVersion = "0.23.33"
val ScalatestVersion = "3.2.19"
lazy val macroUtil = project
.in(file("macro-util"))
.settings(
name := "jing-macro-util",
libraryDependencies ++= Seq(
"dev.continuously.libretto" %% "libretto-lambda" % LibrettoVersion,
"org.scala-lang" %% "scala3-compiler" % scalaVersion.value,
),
scalacOptions ++= scalacOptionsCommon,
)
lazy val jingOpenApiModel = project
.in(file("jing-openapi-model"))
.dependsOn(
macroUtil,
)
.settings(
name := "jing-openapi-model",
scalacOptions ++= scalacOptionsCommon,
libraryDependencies ++= Seq(
"dev.continuously.libretto" %% "libretto-lambda" % LibrettoVersion,
"io.circe" %% "circe-parser" % "0.14.14",
),
)
lazy val jingOpenApi = project
.in(file("jing-openapi"))
.dependsOn(
jingOpenApiModel,
macroUtil,
)
.settings(
name := "jing-openapi",
libraryDependencies ++= Seq(
"io.swagger.parser.v3" % "swagger-parser" % "2.1.35",
"org.scalatest" %% "scalatest" % ScalatestVersion % "test",
),
scalacOptions ++=
scalacOptionsCommon ++
Seq(
"-experimental",
),
)
lazy val jingOpenApiClientDefault = project
.in(file("jing-openapi-client-default"))
.dependsOn(
jingOpenApiModel,
)
.settings(
name := "jing-openapi-client-default",
scalacOptions ++=
scalacOptionsCommon,
)
lazy val jingOpenApiServerHttp4s = project
.in(file("jing-openapi-server-http4s"))
.dependsOn(
jingOpenApiModel,
)
.settings(
name := "jing-openapi-server-http4s",
scalacOptions ++=
scalacOptionsCommon,
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-core" % Http4sVersion,
),
)
lazy val jingOpenApiExamples = project
.in(file("jing-openapi-examples"))
.dependsOn(
jingOpenApiModel,
jingOpenApiClientDefault,
jingOpenApiServerHttp4s,
jingOpenApi % Provided,
)
.settings(
name := "jing-openapi-examples",
scalacOptions ++=
scalacOptionsCommon ++
Seq(
"-experimental",
),
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-ember-server" % Http4sVersion,
),
publish / skip := true,
)