-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
79 lines (71 loc) · 2.16 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
import ReleaseTransformations._
organization in ThisBuild := "io.estatico"
name := "generic-traits"
scalacOptions ++= Seq(
"-Xfatal-warnings",
"-unchecked",
"-feature",
"-deprecation",
"-language:higherKinds",
"-language:implicitConversions",
"-language:experimental.macros"
)
libraryDependencies ++= Seq(
scalaOrganization.value % "scala-reflect" % scalaVersion.value % Provided,
scalaOrganization.value % "scala-compiler" % scalaVersion.value % Provided,
"org.typelevel" %% "macro-compat" % "1.1.1",
"com.chuusai" %% "shapeless" % "2.3.2",
// Test dependencies
"org.scalatest" %% "scalatest" % "3.0.0" % "test"
)
// Needed for @macrocompat.bundle
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
// Publish settings
releaseCrossBuild := true
releasePublishArtifactsAction := PgpKeys.publishSigned.value
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
pushChanges
)
homepage := Some(url("https://github.com/estatico/generic-traits"))
licenses := Seq("Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
publishMavenStyle := true
publishArtifact in Test := false
pomIncludeRepository := { _ => false }
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")
}
scmInfo := Some(
ScmInfo(
url("https://github.com/estatico/generic-traits"),
"scm:git:[email protected]:estatico/generic-traits.git"
)
)
developers := List(
Developer("caryrobbins", "Cary Robbins", "[email protected]", url("http://caryrobbins.com"))
)
credentials ++= (
for {
username <- Option(System.getenv().get("SONATYPE_USERNAME"))
password <- Option(System.getenv().get("SONATYPE_PASSWORD"))
} yield Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
username,
password
)
).toSeq