This repository was archived by the owner on Dec 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sbt
More file actions
100 lines (91 loc) · 2.38 KB
/
build.sbt
File metadata and controls
100 lines (91 loc) · 2.38 KB
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
lazy val root = (project in file(".")).settings(
commonSettings,
compilerOptions,
consoleSettings,
testSettings,
publishSettings
)
lazy val commonSettings = Seq(
organization := "org.systemfw",
name := "eidos",
scalaVersion := "2.11.11",
crossScalaVersions := Seq("2.11.11", "2.12.1")
)
lazy val compilerOptions =
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-encoding",
"utf8",
"-target:jvm-1.8",
"-feature",
"-language:implicitConversions",
"-language:higherKinds",
"-language:existentials",
"-Ypartial-unification",
"-Ywarn-unused-import",
"-Ywarn-value-discard"
)
lazy val consoleSettings = Seq(
initialCommands := s"import eidos._",
scalacOptions in (Compile, console) ~= (_.filterNot(
_ == "-Ywarn-unused-import"))
)
lazy val testSettings = {
val specs2 = Seq(
"specs2-core",
"specs2-matcher-extra",
"specs2-scalacheck"
).map("org.specs2" %% _ % "3.8.8")
val scalacheck = "org.scalacheck" %% "scalacheck" % "1.13.4"
Seq(
libraryDependencies ++= (specs2 :+ scalacheck).map(_ % "test"),
testFrameworks := Seq(TestFrameworks.Specs2)
)
}
import ReleaseTransformations._
lazy val publishSettings = {
val username = "SystemFw"
Seq(
homepage := Some(url(s"https://github.com/$username/${name.value}")),
licenses += "MIT" -> url("http://opensource.org/licenses/MIT"),
scmInfo := Some(
ScmInfo(
url(s"https://github.com/$username/${name.value}"),
s"git@github.com:$username/${name.value}.git"
)
),
publishMavenStyle := true,
publishArtifact in Test := false,
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else Opts.resolver.sonatypeStaging
),
pomExtra := (
<developers>
<developer>
<id>{username}</id>
<name>Fabio Labella</name>
<url>http://github.com/{username}</url>
</developer>
</developers>
),
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
)
)
}