-
Notifications
You must be signed in to change notification settings - Fork 34
/
build.sbt
94 lines (88 loc) · 2.78 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
94
inThisBuild(
Seq(
organization := "io.methvin",
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")),
homepage := Some(url("https://github.com/gmethvin/directory-watcher")),
scmInfo := Some(
ScmInfo(
url("https://github.com/gmethvin/directory-watcher"),
"scm:[email protected]:gmethvin/directory-watcher.git"
)
),
developers := List(
Developer(
"gmethvin",
"Greg Methvin",
new URL("https://github.com/gmethvin")
)
),
scalaVersion := "3.3.3",
scalafmtOnCompile := true
)
)
def commonSettings =
Seq(
publishMavenStyle := true,
publishTo := sonatypePublishToBundle.value,
Test / fork := true,
compile / javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint"),
scalacOptions ++= Seq("-release", "8"),
libraryDependencies ++= Seq(
"com.github.sbt" % "junit-interface" % "0.13.2" % Test,
"ch.qos.logback" % "logback-classic" % "1.3.12" % Test
)
)
// directory-watcher is a Java-only library. No Scala dependencies should be added.
lazy val `directory-watcher` = (project in file("core"))
.settings(commonSettings)
.settings(
autoScalaLibrary := false,
crossPaths := false,
libraryDependencies ++= Seq(
"net.java.dev.jna" % "jna" % "5.13.0",
"org.slf4j" % "slf4j-api" % "1.7.36",
"io.airlift" % "command" % "0.3" % Test,
"com.google.guava" % "guava" % "33.3.0-jre" % Test,
"org.codehaus.plexus" % "plexus-utils" % "3.5.1" % Test,
"commons-io" % "commons-io" % "2.17.0" % Test,
"org.awaitility" % "awaitility" % "4.2.2" % Test
)
)
// directory-watcher-better-files is a Scala library.
lazy val `directory-watcher-better-files` = (project in file("better-files"))
.settings(commonSettings)
.settings(
crossScalaVersions := Seq(scalaVersion.value, "2.13.14", "2.12.20"),
crossPaths := true,
libraryDependencies ++= Seq(
"com.github.pathikrit" %% "better-files" % "3.9.2",
"org.scalatest" %% "scalatest" % "3.2.19" % Test
)
)
.dependsOn(`directory-watcher`)
lazy val root = (project in file("."))
.settings(
PgpKeys.publishSigned := {},
publish := {},
publishLocal := {},
publishArtifact := false,
publish / skip := true
)
.aggregate(`directory-watcher`, `directory-watcher-better-files`)
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
releaseCrossBuild := true
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)