-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sbt
107 lines (97 loc) · 3.17 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
import Dependencies._
import ScalaOptions._
ThisBuild / organization := "com.enfore"
ThisBuild / crossScalaVersions := supportedVersions
fork in Test in ThisBuild := true
lazy val http4s = Seq(http4sCore, http4sDsl, http4sCirce, http4sServer)
lazy val commonScalaSettings = Seq(
scalacOptions ++= compilerFlags,
Test / fork := true,
scalaVersion := "2.12.11",
organization := "com.enfore",
scalacOptions ++= compilerFlags,
scalacOptions in (Compile, console) ~= (_ filterNot (_ == "-Xfatal-warnings")),
Compile / doc / javacOptions ++= Seq(
"-no-link-warnings"
),
Compile / doc / scalacOptions ++= Seq(
"-no-link-warnings"
)
)
lazy val sharedDependencies =
Seq(
enumeratum,
enumeratumCirce,
circeRefined,
circeCore,
circeParser,
circeExtras,
circeGeneric,
circeDerivation,
scalaCompat,
scalatest % Test
)
lazy val root = (project in file("."))
.settings(name := "openapi")
.settings(publish / skip := true)
.settings(commonScalaSettings: _*)
.aggregate(`openapi-scala`, `openapi-lib`, `openapi-http4s-lib`, `sbt-openapi`)
lazy val `openapi-scala` = (project in file("openapi-scala"))
.settings(
name := "openapi-scala",
libraryDependencies ++= Seq(
circeYaml % "test",
scalameta % "test"
) ++ sharedDependencies
)
.settings(commonScalaSettings ++ publishSettings: _*)
lazy val `openapi-lib` = (project in file("openapi-lib"))
.settings(
name := "openapi-lib",
crossScalaVersions := supportedVersions
)
.settings(commonScalaSettings ++ publishSettings: _*)
lazy val `openapi-http4s-lib` = (project in file("openapi-http4s-lib"))
.settings(
name := "openapi-http4s-lib",
crossScalaVersions := supportedVersions,
libraryDependencies ++= sharedDependencies ++ http4s
)
.dependsOn(`openapi-lib`)
.settings(commonScalaSettings ++ publishSettings: _*)
lazy val `sbt-openapi` = (project in file("sbt-openapi"))
.settings(
name := "sbt-openapi",
sbtPlugin := true,
libraryDependencies ++= Seq(
Dependencies.scalafmt,
swaggerCore,
swaggerParser,
scriptedPlugin(sbtVersion.value)
)
)
.settings(commonScalaSettings ++ publishSettings: _*)
.dependsOn(`openapi-scala`)
lazy val publishSettings = Seq(
crossPaths := true,
autoAPIMappings := true,
useGpg := false,
usePgpKeyHex("1EAA6358E4812E9E"),
pgpPublicRing := file(".") / "project" / ".gnupg" / "pubring.gpg",
pgpSecretRing := file(".") / "project" / ".gnupg" / "secring.gpg",
pgpPassphrase := sys.env.get("PGP_PASSPHRASE").map(_.toArray),
publishMavenStyle := true,
homepage := Some(url("https://github.com/NumberFour/openapi-scala")),
developers := List(
Developer("ChetanBhasin", "Chetan Bhasin", "[email protected]", url("https://github.com/ChetanBhasin")),
Developer("bijancn", "Bijan Chokoufe Nejad", "[email protected]", url("https://github.com/bijancn"))
),
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")),
scmInfo := Some(
ScmInfo(
url("https://github.com/NumberFour/openapi-scala"),
"scm:git:[email protected]:NumberFour/openapi-scala",
"scm:git:https://github.com/NumberFour/openapi-scala"
)
)
)