forked from scodec/scodec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
93 lines (77 loc) · 3.54 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
import com.typesafe.tools.mima.core._
ThisBuild / tlBaseVersion := "2.1"
ThisBuild / organization := "org.scodec"
ThisBuild / organizationName := "Scodec"
ThisBuild / startYear := Some(2013)
ThisBuild / crossScalaVersions := Seq("3.1.2")
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8"))
ThisBuild / scmInfo := Some(
ScmInfo(url("https://github.com/scodec/scodec"), "[email protected]:scodec/scodec.git")
)
ThisBuild / licenses := List(
("BSD-3-Clause", url("https://github.com/scodec/scodec/blob/main/LICENSE"))
)
ThisBuild / developers ++= List(
tlGitHubDev("mpilquist", "Michael Pilquist"),
tlGitHubDev("pchiusano", "Paul Chiusano")
)
ThisBuild / mimaBinaryIssueFilters ++= Seq(
ProblemFilters.exclude[DirectMissingMethodProblem]("scodec.IsoLowPriority.toTuple"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scodec.IsoLowPriority.fromTuple"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scodec.codecs.codecs#package.zlib"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scodec.codecs.codecs#package.zlib$default$2"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scodec.codecs.codecs#package.zlib$default$3"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scodec.codecs.codecs#package.zlib$default$4"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scodec.codecs.codecs#package.zlib$default$5"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scodec.codecs.codecs#package.zlib"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scodec.codecs.codecs#package.zlib$default$2"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scodec.codecs.codecs#package.zlib$default$3"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scodec.codecs.codecs#package.zlib$default$4"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scodec.codecs.codecs#package.zlib$default$5")
)
lazy val root = tlCrossRootProject.aggregate(testkit, core, unitTests, benchmarks)
lazy val core = crossProject(JVMPlatform, JSPlatform)
.in(file("."))
.settings(
name := "scodec-core",
libraryDependencies ++= Seq(
"org.scodec" %%% "scodec-bits" % "1.1.31"
),
scalacOptions := scalacOptions.value
.filterNot(_ == "-source:3.0-migration") :+ "-source:future",
Test / scalacOptions := (Compile / scalacOptions).value,
Compile / unmanagedResources ++= {
val base = baseDirectory.value
(base / "NOTICE") +: (base / "LICENSE") +: ((base / "licenses") * "LICENSE_*").get
}
)
lazy val coreJS = core.js.settings(
scalaJSLinkerConfig ~= (_.withModuleKind(ModuleKind.CommonJSModule)),
mimaBinaryIssueFilters ++= Seq(
ProblemFilters.exclude[MissingClassProblem]("scodec.codecs.ZlibCodec")
)
)
lazy val testkit = crossProject(JVMPlatform, JSPlatform)
.settings(
name := "scodec-testkit",
libraryDependencies += "org.scalameta" %%% "munit-scalacheck" % "0.7.29",
scalacOptions := scalacOptions.value.filterNot(_ == "-source:3.0-migration") :+ "-source:future"
)
.dependsOn(core % "compile->compile")
lazy val testkitJVM = testkit.jvm
lazy val testkitJS = testkit.js
lazy val unitTests = project
.settings(
libraryDependencies ++= Seq(
"org.bouncycastle" % "bcpkix-jdk15on" % "1.70" % "test"
),
scalacOptions := scalacOptions.value.filterNot(
_ == "-source:3.0-migration"
) :+ "-source:future",
Test / scalacOptions := (Compile / scalacOptions).value
)
.dependsOn(testkitJVM % "test->compile")
.enablePlugins(NoPublishPlugin)
lazy val benchmarks = project
.dependsOn(core.jvm)
.enablePlugins(JmhPlugin, NoPublishPlugin)