-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
161 lines (148 loc) · 4.44 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
import ReleaseTransformations._
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
lazy val http4sVersion = "0.23.27"
lazy val additionalSupportedScalaVersions = List("2.13.12", "2.12.18")
lazy val root = (project in file("."))
.settings(
name := "meters4s",
commonSettings,
libraryDependencies ++= commonDependencies,
git.remoteRepo := "[email protected]:keirlawson/meters4s.git",
ScalaUnidoc / siteSubdirName := "latest/api",
addMappingsToSiteDir(
ScalaUnidoc / packageDoc / mappings,
ScalaUnidoc / siteSubdirName
),
crossScalaVersions := Nil,
publish / skip := true,
publishArtifact := false,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)
)
.enablePlugins(GhpagesPlugin)
.enablePlugins(SiteScaladocPlugin)
.enablePlugins(ScalaUnidocPlugin)
.aggregate(core, datadog, statsd, prometheus, docs, http4s)
lazy val commonSettings = Seq(
organization := "io.github.keirlawson",
scalaVersion := "3.3.1",
crossScalaVersions ++= additionalSupportedScalaVersions,
homepage := Some(url("https://github.com/keirlawson/meters4s")),
startYear := Some(2020),
licenses := Seq(
("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))
),
scmInfo := Some(
ScmInfo(
url("https://github.com/keirlawson/meters4s"),
"[email protected]:keirlawson/meters4s.git"
)
),
developers := List(
Developer(
"keirlawson",
"Keir Lawson",
url("https://github.com/keirlawson")
)
)
)
lazy val publishSettings = Seq(
publishTo := sonatypePublishToBundle.value,
sonatypeProfileName := "io.github.keirlawson",
publishMavenStyle := true
)
lazy val commonDependencies = Seq(
"org.typelevel" %% "cats-core" % "2.12.0",
"org.typelevel" %% "cats-effect" % "3.5.4",
"org.typelevel" %% "munit-cats-effect" % "2.0.0" % Test,
"io.micrometer" % "micrometer-core" % "1.10.13",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0",
// See https://github.com/micrometer-metrics/micrometer/issues/1133#issuecomment-452434205
"com.google.code.findbugs" % "jsr305" % "3.0.2" % Optional
)
lazy val core = project
.settings(
name := "meters4s",
commonSettings,
publishSettings,
libraryDependencies ++= commonDependencies
)
lazy val datadog = project
.settings(
name := "meters4s-datadog",
commonSettings,
publishSettings,
libraryDependencies ++= commonDependencies ++ Seq(
"io.micrometer" % "micrometer-registry-datadog" % "1.10.13"
)
)
.dependsOn(core)
lazy val statsd = project
.settings(
name := "meters4s-statsd",
commonSettings,
publishSettings,
libraryDependencies ++= commonDependencies ++ Seq(
"io.micrometer" % "micrometer-registry-statsd" % "1.10.13"
)
)
.dependsOn(core)
lazy val prometheus = project
.settings(
name := "meters4s-prometheus",
commonSettings,
publishSettings,
libraryDependencies ++= commonDependencies ++ Seq(
"io.micrometer" % "micrometer-registry-prometheus" % "1.10.13"
)
)
.dependsOn(core)
lazy val http4s = project
.settings(
name := "meters4s-http4s",
commonSettings,
publishSettings,
libraryDependencies ++= commonDependencies ++ Seq(
"org.http4s" %% "http4s-core" % http4sVersion,
"org.http4s" %% "http4s-dsl" % http4sVersion % Test,
"org.http4s" %% "http4s-server" % http4sVersion % Test,
"org.http4s" %% "http4s-client" % http4sVersion % Test,
)
)
.dependsOn(core)
lazy val docs = project
.settings(
commonSettings,
mdocIn := file("docs/README.md"),
mdocOut := file("README.md"),
mdocVariables := Map(
"VERSION" -> version.value
),
publish / skip := true,
publishArtifact := false,
// mdoc (transitively) depends on scala-collection-compat_2.13,
// which conflicts with core's dependency on scala-collection-compat_3
libraryDependencies := libraryDependencies.value.map(
_ excludeAll (
ExclusionRule(
organization = "org.scala-lang.modules",
name = "scala-collection-compat_2.13"
),
)
)
)
.dependsOn(datadog)
.enablePlugins(MdocPlugin)