-
Notifications
You must be signed in to change notification settings - Fork 53
/
build.sbt
95 lines (70 loc) · 2.31 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
name := "sPDF"
description := "Create PDFs using plain old HTML+CSS. Uses wkhtmltopdf on the back-end which renders HTML using Webkit."
homepage := Some(url("https://github.com/cloudify/sPDF"))
startYear := Some(2013)
licenses := Seq(
("MIT", url("http://opensource.org/licenses/MIT"))
)
organization := "io.github.cloudify"
scalaVersion := "2.12.0"
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0")
releaseCrossBuild := true
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-encoding", "UTF-8"
)
fork in Test := true
parallelExecution in Test := false
logLevel in compile := Level.Warn
scmInfo := Some(
ScmInfo(
url("https://github.com/cloudify/sPDF"),
"scm:git:https://github.com/cloudify/sPDF.git",
Some("scm:git:[email protected]:cloudify/sPDF.git")
)
)
// add dependencies on standard Scala modules, in a way
// supporting cross-version publishing
// taken from: http://github.com/scala/scala-module-dependency-sample
libraryDependencies := {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, scalaMajor)) if scalaMajor >= 11 =>
libraryDependencies.value ++ Seq(
"org.scala-lang.modules" %% "scala-xml" % "1.0.6",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4"
)
case _ =>
libraryDependencies.value
}
}
libraryDependencies ++= Seq (
"org.scalatest" %% "scalatest" % "3.0.0" % "test",
"org.mockito" % "mockito-all" % "1.10.8" % "test"
)
// publishing
publishMavenStyle := true
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
credentials += Credentials(Path.userHome / ".credentials.sonatype")
publishArtifact in Test := false
// publishArtifact in (Compile, packageDoc) := false
// publishArtifact in (Compile, packageSrc) := false
pomIncludeRepository := { _ => false }
pomExtra := (
<developers>
<developer>
<id>cloudify</id>
<name>Federico Feroldi</name>
<email>[email protected]</email>
<url>http://www.pixzone.com</url>
</developer>
</developers>
)
// Josh Suereth's step-by-step guide to publishing on sonatype
// http://www.scala-sbt.org/using_sonatype.html