-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sbt
73 lines (67 loc) · 1.89 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
// Site building with ´sbt-site´
enablePlugins(SiteScaladocPlugin)
val TycheLibraryVersion = "0.4.3"
def globalSettings = Seq(
organization := "com.github.neysofu",
version := TycheLibraryVersion,
scalaVersion := "2.12.0",
scalacOptions := Seq(
"-deprecation",
"-unchecked",
"-feature"
)
)
def travisSettings = sys.env.get("TRAVIS") match {
case None => Seq()
case Some(_) => Seq(
// Signature
pgpSecretRing := file("keys/secring.asc"),
pgpPublicRing := file("keys/pubring.asc"),
// Passphrase
pgpPassphrase := Option(sys.env("SONATYPE_PGP").toArray),
// Username/Password
credentials += Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
sys.env("SONATYPE_USERNAME"),
sys.env("SONATYPE_PASSWORD")
)
)
}
def dependencySettings = Seq(
libraryDependencies ++= Seq(Dependencies.scalatest)
)
def publishSettings = Seq(
publishMavenStyle := true,
publishArtifact in Test := 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")
},
pomExtra := (
<url>https://github.com/neysofu/tyche</url>
<licenses>
<license>
<name>MIT</name>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:git@github.com:neysofu/tyche.git</connection>
<url>git@github.com/neysofu/tyche.git</url>
</scm>
<developers>
<developer><id>neysofu</id><name>Filippo Costa</name><url>https://github.com/neysofu</url></developer>
</developers>
)
)
lazy val root = Project(
id = "tyche",
base = file("."),
settings = globalSettings ++ dependencySettings ++ publishSettings ++
travisSettings
)