-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.sbt
108 lines (94 loc) · 3.21 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
95
96
97
98
99
100
101
102
103
104
105
106
107
import ReleaseTransformations._
lazy val Vers = new {
val circe = "0.11.1"
val scalatest = "3.0.1"
}
lazy val commonSettings = Seq(
name := "Argus",
organization := "com.github.aishfenton",
scalaVersion := "2.12.2",
crossScalaVersions := Seq("2.11.11", "2.12.2"),
scalacOptions ++= Seq("-target:jvm-1.8", "-Ypartial-unification"),
homepage := Some(url("https://github.com/aishfenton/Argus")),
licenses := Seq("MIT License" -> url("http://www.opensource.org/licenses/MIT")),
addCompilerPlugin("org.scalamacros" %% "paradise" % "2.1.0" cross CrossVersion.full),
// NB: We put example schemas in main package since otherwise the macros can't run for test (since they
// excute before test-classes is populated). But then we need to exclude them from packing.
mappings in (Compile, packageBin) ~= { _.filter(!_._1.getName.endsWith(".json")) },
publishMavenStyle := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
sonatypeProfileName := "com.github.aishfenton",
pomExtra := (
<scm>
<url>git@github.com:aishfenton/Argus.git</url>
<connection>scm:git:git@github.com:aishfenton/Argus.git</connection>
</scm>
<developers>
<developer>
<id>aishfenton</id>
<name>Aish Fenton</name>
</developer>
<developer>
<id>datamusing</id>
<name>Sudeep Das</name>
</developer>
<developer>
<id>dbtsai</id>
<name>DB Tsai</name>
</developer>
<developer>
<id>rogermenezes</id>
<name>Roger Menezes</name>
</developer>
</developers>
),
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
ReleaseStep(action = Command.process("publishSigned", _), enableCrossBuild = true),
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _), enableCrossBuild = true),
pushChanges
)
)
lazy val noPublishSettings = Seq(
publish := (),
publishLocal := (),
publishArtifact := false
)
lazy val argus = project.
settings(moduleName := "argus").
settings(commonSettings: _*).
settings(
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.scala-lang" % "scala-compiler" % scalaVersion.value % Provided,
"io.circe" %% "circe-core" % Vers.circe,
"io.circe" %% "circe-generic" % Vers.circe,
"io.circe" %% "circe-parser" % Vers.circe,
"io.circe" %% "circe-java8" % Vers.circe,
"org.scalactic" %% "scalactic" % Vers.scalatest % Test,
"org.scalatest" %% "scalatest" % Vers.scalatest % Test
)
)
lazy val root = (project in file(".")).
aggregate(argus).
settings(commonSettings: _*).
settings(noPublishSettings: _*)
// Clears screen between refreshes in continuous mode
maxErrors := 5
triggeredMessage := Watched.clearWhenTriggered