-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
93 lines (75 loc) · 2.51 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
lazy val scalaVersions = Seq("2.13.14", "2.12.18")
ThisBuild / scalaVersion := scalaVersions.head
ThisBuild / versionScheme := Some("early-semver")
lazy val commonSettings: SettingsDefinition = Def.settings(
organization := "de.lolhens",
name := "fs2-pcap",
version := "0.0.1-SNAPSHOT",
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0")),
homepage := scmInfo.value.map(_.browseUrl),
scmInfo := Some(
ScmInfo(
url("https://github.com/LolHens/fs2-pcap"),
"scm:git@github.com:LolHens/fs2-pcap.git"
)
),
developers := List(
Developer(id = "LolHens", name = "Pierre Kisters", email = "pierrekisters@gmail.com", url = url("https://github.com/LolHens/"))
),
libraryDependencies ++= Seq(
"org.scalameta" %% "munit" % "0.7.29" % Test,
"ch.qos.logback" % "logback-classic" % "1.2.13" % Test,
),
testFrameworks += new TestFramework("munit.Framework"),
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1"),
Compile / doc / sources := Seq.empty,
version := {
val tagPrefix = "refs/tags/"
sys.env.get("CI_VERSION").filter(_.startsWith(tagPrefix)).map(_.drop(tagPrefix.length)).getOrElse(version.value)
},
publishMavenStyle := true,
publishTo := sonatypePublishToBundle.value,
credentials ++= (for {
username <- sys.env.get("SONATYPE_USERNAME")
password <- sys.env.get("SONATYPE_PASSWORD")
} yield Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
username,
password
)).toList
)
name := (root / name).value
lazy val root: Project =
project
.in(file("."))
.settings(commonSettings)
.settings(
publishArtifact := false,
publish / skip := true
)
.aggregate(core.projectRefs: _*)
.aggregate(sample.projectRefs: _*)
lazy val core = projectMatrix.in(file("core"))
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"co.fs2" %% "fs2-core" % "3.9.4",
"org.pcap4j" % "pcap4j-core" % "1.8.2",
"de.lolhens" %% "munit-tagless-final" % "0.2.0" % Test,
"org.pcap4j" % "pcap4j-packetfactory-static" % "1.8.2" % Test,
),
)
.jvmPlatform(scalaVersions)
lazy val sample = projectMatrix.in(file("sample"))
.settings(commonSettings)
.settings(
name := "fs2-pcap-sample",
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.13",
"org.pcap4j" % "pcap4j-packetfactory-static" % "1.8.2",
),
publish / skip := true,
)
.dependsOn(core)
.jvmPlatform(Seq(scalaVersions.head))