forked from dmurvihill/courier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
91 lines (84 loc) · 2.75 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
addCommandAlias("ci", ";clean ;+test")
addCommandAlias("release", ";project root ;+publishSigned ;sonatypeReleaseAll")
lazy val gpgSettings = Seq(
useGpg := true
)
lazy val credentialSettings = Seq(
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
)
lazy val publisherSettings = Seq(
sonatypeProfileName := organization.value,
publishMavenStyle := true,
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
)
)
lazy val releaseSettings = gpgSettings ++ publisherSettings ++ credentialSettings
lazy val commonSettings = releaseSettings ++ Seq(
version := "1.0.0",
organization := "com.github.daddykotex",
description := "deliver electronic mail with scala",
licenses := Seq(("MIT", url("https://opensource.org/licenses/MIT"))),
homepage := Some(url("https://github.com/dmurvihill/courier")),
crossScalaVersions := Seq("2.10.7", "2.11.12", "2.12.8"),
scalaVersion := crossScalaVersions.value.last,
scmInfo := Some(
ScmInfo(
url("https://github.com/dmurvihill/courier"),
"scm:[email protected]:dmurvihill/courier.git"
)
),
developers := List(
Developer(
id = "daddykotex",
name = "David Francoeur",
email = "[email protected]",
url = url("https://davidfrancoeur.com")
),
Developer(
id = "dmurvihill",
name = "Dolan Murvihill",
email = "[email protected]",
url = url("https://github.com/dmurvihill")
)
)
)
lazy val cFlags = Seq(
scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n <= 10 =>
Seq(
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions"
)
case Some((2, n)) if n == 11 =>
Seq(
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-Ypartial-unification"
)
case _ =>
ScalacOptions.All
})
)
lazy val root = (project in file("."))
.settings(commonSettings ++ cFlags)
.settings(
name := "courier",
libraryDependencies ++= Seq(
"com.sun.mail" % "javax.mail" % "1.6.2",
"javax.activation" % "activation" % "1.1.1",
"org.bouncycastle" % "bcpkix-jdk15on" % "1.61" % Optional,
"org.bouncycastle" % "bcmail-jdk15on" % "1.61" % Optional,
"org.scalactic" %% "scalactic" % "3.0.5" % Test,
"org.scalatest" %% "scalatest" % "3.0.5" % Test,
"org.jvnet.mock-javamail" % "mock-javamail" % "1.9" % Test
)
)