This repository has been archived by the owner on Oct 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.sbt
87 lines (69 loc) · 2.87 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
import com.typesafe.tools.mima.core._
import sbtcrossproject.CrossPlugin.autoImport.{CrossType, crossProject}
import com.typesafe.sbt.SbtGit.GitKeys.{gitCurrentBranch, gitHeadCommit}
addCommandAlias("fmt", "; compile:scalafmt; test:scalafmt; scalafmtSbt")
addCommandAlias("fmtCheck", "; compile:scalafmtCheck; test:scalafmtCheck; scalafmtSbtCheck")
ThisBuild / baseVersion := "2.0"
ThisBuild / organization := "org.scodec"
ThisBuild / organizationName := "Scodec"
ThisBuild / homepage := Some(url("https://github.com/scodec/scodec-stream"))
ThisBuild / startYear := Some(2013)
ThisBuild / crossScalaVersions := Seq("2.12.13", "2.13.5", "3.0.2")
ThisBuild / strictSemVer := false
ThisBuild / githubWorkflowJavaVersions := Seq("[email protected]")
ThisBuild / spiewakCiReleaseSnapshots := true
ThisBuild / spiewakMainBranches := List("main", "develop")
ThisBuild / scmInfo := Some(
ScmInfo(url("https://github.com/scodec/scodec-stream"), "[email protected]:scodec/scodec-stream.git")
)
ThisBuild / licenses := List(
("BSD-3-Clause", url("https://github.com/scodec/scodec-stream/blob/main/LICENSE"))
)
ThisBuild / testFrameworks += new TestFramework("munit.Framework")
ThisBuild / publishGithubUser := "mpilquist"
ThisBuild / publishFullName := "Michael Pilquist"
ThisBuild / developers ++= List(
"pchiusano" -> "Paul Chiusano"
).map {
case (username, fullName) =>
Developer(username, fullName, s"@$username", url(s"https://github.com/$username"))
}
ThisBuild / fatalWarningsInCI := false
ThisBuild / mimaBinaryIssueFilters ++= Seq(
)
val stream = crossProject(JVMPlatform, JSPlatform)
.in(file("."))
.enablePlugins(BuildInfoPlugin)
.settings(
name := "scodec-stream",
buildInfoPackage := "scodec.stream",
buildInfoKeys := Seq[BuildInfoKey](version, scalaVersion, gitHeadCommit),
libraryDependencies ++= Seq(
"co.fs2" %%% "fs2-core" % "2.5.6",
"org.scodec" %%% "scodec-core" % (if (isDotty.value) "2.0.0" else "1.11.7"),
"org.scalacheck" %%% "scalacheck" % "1.15.4" % Test
),
unmanagedResources in Compile ++= {
val base = baseDirectory.value
(base / "NOTICE") +: (base / "LICENSE") +: ((base / "licenses") * "LICENSE_*").get
}
)
lazy val streamJVM = stream.jvm
.enablePlugins(SbtOsgi)
.settings(
libraryDependencies += "co.fs2" %%% "fs2-io" % "2.5.6" % Test,
OsgiKeys.privatePackage := Nil,
OsgiKeys.exportPackage := Seq("scodec.stream.*;version=${Bundle-Version}"),
OsgiKeys.importPackage := Seq(
"""scala.*;version="$<range;[==,=+);$<@>>"""",
"""fs2.*;version="$<range;[==,=+);$<@>>"""",
"""scodec.*;version="$<range;[==,=+);$<@>>"""",
"*"
),
OsgiKeys.additionalHeaders := Map("-removeheaders" -> "Include-Resource,Private-Package")
)
lazy val streamJS = stream.js
lazy val root = project
.in(file("."))
.aggregate(streamJVM, streamJS)
.enablePlugins(NoPublishPlugin, SonatypeCiReleasePlugin)