-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.sbt
77 lines (57 loc) · 2.62 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
import com.typesafe.tools.mima.core._
ThisBuild / tlBaseVersion := "0.5" // your current series x.y
ThisBuild / organization := "io.chrisdavenport"
ThisBuild / organizationName := "Christopher Davenport"
ThisBuild / licenses := Seq(License.MIT)
ThisBuild / developers := List(
// your GitHub handle and name
tlGitHubDev("christopherdavenport", "Christopher Davenport")
)
// true by default, set to false to publish to s01.oss.sonatype.org
ThisBuild / tlSonatypeUseLegacyHost := true
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
val Scala213 = "2.13.12"
ThisBuild / crossScalaVersions := Seq("2.12.18", "3.3.1", Scala213)
ThisBuild / scalaVersion := crossScalaVersions.value.last
lazy val `epimetheus` = tlCrossRootProject
.settings(commonSettings)
.aggregate(core)
lazy val core = project.in(file("core"))
.settings(commonSettings)
.settings(
name := "epimetheus"
)
lazy val site = project.in(file("site"))
.enablePlugins(TypelevelSitePlugin)
.dependsOn(core)
val prometheusV = "1.2.1"
val catsV = "2.9.0"
val catsEffectV = "3.4.8"
val shapelessV = "2.3.9"
val munitCatsEffectV = "1.0.7"
// General Settings
lazy val commonSettings = Seq(
mimaBinaryIssueFilters := List({(_: Problem) => false}), // TODO: remove this once switched to next major version
javacOptions ++= Seq("--release", "8"),
scalacOptions --= List("-source", "future", "-Xfatal-warnings"),
Compile / doc / scalacOptions ++=
Seq("-doc-root-content", (baseDirectory.value.getParentFile / "rootdoc.txt").getAbsolutePath),
Compile / doc / scalacOptions ++= Opts.doc.title("epimetheus"),
libraryDependencies ++= Seq(
"io.prometheus" % "prometheus-metrics-core" % prometheusV,
"io.prometheus" % "prometheus-metrics-instrumentation-jvm" % prometheusV,
"io.prometheus" % "prometheus-metrics-exposition-formats" % prometheusV,
"org.typelevel" %% "cats-core" % catsV,
"org.typelevel" %% "cats-effect" % catsEffectV,
"org.typelevel" %%% "munit-cats-effect-3" % munitCatsEffectV % Test,
"org.scala-lang.modules" %%% "scala-collection-compat" % "2.11.0" % Test
),
libraryDependencies ++= PartialFunction.condOpt(CrossVersion.partialVersion(scalaVersion.value)) { case Some((2, _)) =>
Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"com.chuusai" %% "shapeless" % shapelessV
)
}
.toList
.flatten
)