This repository has been archived by the owner on Aug 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.sbt
106 lines (94 loc) · 3.36 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
96
97
98
99
100
101
102
103
104
105
lazy val contributors = Seq(
"pchiusano" -> "Paul Chiusano",
"pchlupacek" -> "Pavel Chlupáček",
"alissapajer" -> "Alissa Pajer",
"djspiewak" -> "Daniel Spiewak",
"fthomas" -> "Frank Thomas",
"runarorama" -> "Rúnar Ó. Bjarnason",
"jedws" -> "Jed Wesley-Smith",
"wookietreiber" -> "Christian Krause",
"mpilquist" -> "Michael Pilquist"
)
organization := "co.fs2"
name := "fs2-scalaz"
scalaVersion := "2.11.11"
crossScalaVersions := Seq("2.11.11", "2.12.4")
scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-language:implicitConversions",
"-language:higherKinds",
"-language:existentials",
"-language:postfixOps",
"-Xfatal-warnings",
"-Yno-adapted-args",
"-Ywarn-value-discard",
"-Ywarn-unused-import"
)
scalacOptions in (Compile, console) ~= {_.filterNot("-Ywarn-unused-import" == _)}
scalacOptions in (Test, console) <<= (scalacOptions in (Compile, console))
resolvers += "Sonatype Public" at "https://oss.sonatype.org/content/groups/public/"
val scalazVersion = "7.2.16"
libraryDependencies ++= Seq(
"co.fs2" %% "fs2-core" % "0.9.7",
"org.scalaz" %% "scalaz-core" % scalazVersion,
"org.scalaz" %% "scalaz-concurrent" % scalazVersion
)
scmInfo := Some(ScmInfo(url("https://github.com/functional-streams-for-scala/fs2-scalaz"), "[email protected]:functional-streams-for-scala/fs2-scalaz.git"))
homepage := Some(url("https://github.com/functional-streams-for-scala/fs2"))
licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
initialCommands := s"""
import fs2._
import fs2.interop.scalaz._
import scalaz._
import Scalaz._
"""
parallelExecution in Test := false
logBuffered in Test := false
testOptions in Test += Tests.Argument("-verbosity", "2")
testOptions in Test += Tests.Argument("-minSuccessfulTests", "500")
publishArtifact in Test := true
scalacOptions in (Compile, doc) ++= Seq(
"-doc-source-url", scmInfo.value.get.browseUrl + "/tree/master€{FILE_PATH}.scala",
"-sourcepath", baseDirectory.in(LocalRootProject).value.getAbsolutePath,
"-implicits",
"-implicits-show-all"
)
scalacOptions in (Compile, doc) ~= (_.filterNot(_ == "-Xfatal-warnings"))
autoAPIMappings := 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 ++= (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
publishMavenStyle := true
pomIncludeRepository := { _ => false }
pomExtra := {
<developers>
{for ((username, name) <- contributors) yield
<developer>
<id>{username}</id>
<name>{name}</name>
<url>https://github.com/{username}</url>
</developer>
}
</developers>
}
pomPostProcess := { node =>
import scala.xml._
import scala.xml.transform._
def stripIf(f: Node => Boolean) = new RewriteRule {
override def transform(n: Node) =
if (f(n)) NodeSeq.Empty else n
}
val stripTestScope = stripIf { n => n.label == "dependency" && (n \ "scope").text == "test" }
new RuleTransformer(stripTestScope).transform(node)(0)
}
releaseCrossBuild := true
releasePublishArtifactsAction := PgpKeys.publishSigned.value