-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.sbt
79 lines (72 loc) · 2.08 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
ThisBuild / organization := "io.circe"
ThisBuild / crossScalaVersions := Seq("2.12.15", "2.13.8")
ThisBuild / githubWorkflowPublishTargetBranches := Nil
ThisBuild / githubWorkflowBuild := Seq(
WorkflowStep.Use(
UseRef.Public(
"codecov",
"codecov-action",
"v1"
)
)
)
val compilerOptions = Seq(
"-deprecation",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-unchecked",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Xfuture"
)
val circeVersion = "0.14.1"
val scalaTestVersion = "3.2.11"
def priorTo2_13(scalaVersion: String): Boolean =
CrossVersion.partialVersion(scalaVersion) match {
case Some((2, minor)) if minor < 13 => true
case _ => false
}
val baseSettings = Seq(
scalacOptions ++= compilerOptions,
scalacOptions in (Compile, console) ~= {
_.filterNot(Set("-Ywarn-unused-import"))
},
scalacOptions in (Test, console) ~= {
_.filterNot(Set("-Ywarn-unused-import"))
},
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots")
),
coverageHighlighting := true
)
val circeDependencies = Seq(
"io.circe" %% "circe-core",
"io.circe" %% "circe-jawn"
).map(_ % circeVersion)
lazy val benchmark = project
.in(file("."))
.settings(baseSettings ++ noPublishSettings)
.settings(
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-json" % "2.9.2",
"io.argonaut" %% "argonaut" % "6.3.8",
"io.circe" %% "circe-derivation" % "0.13.0-M5",
"io.circe" %% "circe-jackson29" % "0.14.0",
"io.spray" %% "spray-json" % "1.3.6",
"org.json4s" %% "json4s-jackson" % "4.0.4",
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-core" % "2.13.17",
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % "2.13.17",
"org.scalatest" %% "scalatest" % scalaTestVersion % Test
),
libraryDependencies ++= circeDependencies
)
.enablePlugins(JmhPlugin)
lazy val noPublishSettings = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)