-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
108 lines (99 loc) · 2.98 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
106
107
108
lazy val finchVersion = "0.23.0"
lazy val sprayVersion = "1.3.4"
lazy val buildSettings = Seq(
organization := "com.github.finagle",
version := finchVersion,
scalaVersion := "2.12.6",
crossScalaVersions := Seq("2.11.12", "2.12.6")
)
lazy val compilerOptions = Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Xfuture",
"-Xlint"
)
val testDependencies = Seq(
"com.github.finagle" %% "finch-json-test" % finchVersion,
"org.mockito" % "mockito-all" % "1.10.19",
"org.scalacheck" %% "scalacheck" % "1.13.5",
"org.scalatest" %% "scalatest" % "3.0.4"
)
val baseSettings = Seq(
libraryDependencies ++= Seq(
"com.github.finagle" %% "finch-core" % finchVersion,
"io.spray" %% "spray-json" % sprayVersion
) ++ testDependencies.map(_ % "test"),
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots")
),
scalacOptions ++= compilerOptions ++ Seq("-Ywarn-unused-import"),
scalacOptions in (Compile, console) ~= (_ filterNot (_ == "-Ywarn-unused-import")),
scalacOptions in (Compile, console) += "-Yrepl-class-based"
)
lazy val publishSettings = Seq(
publishMavenStyle := true,
publishArtifact := true,
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")
},
publishArtifact in Test := false,
licenses := Seq("Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
homepage := Some(url("https://github.com/finagle/finch")),
autoAPIMappings := true,
apiURL := Some(url("https://finagle.github.io/finch/docs/")),
scmInfo := Some(
ScmInfo(
url("https://github.com/finagle/finch"),
"scm:git:[email protected]:finagle/finch.git"
)
),
pomExtra :=
<developers>
<developer>
<id>vkostyukov</id>
<name>Vladimir Kostyukov</name>
<url>http://vkostyukov.net</url>
</developer>
<developer>
<id>travisbrown</id>
<name>Travis Brown</name>
<url>https://meta.plasm.us/</url>
</developer>
<developer>
<id>rpless</id>
<name>Ryan Plessner</name>
<url>https://twitter.com/ryan_plessner</url>
</developer>
<developer>
<id>sergeykolbasov</id>
<name>Sergey Kolbasov</name>
<url>https://twitter.com/sergey_kolbasov</url>
</developer>
</developers>
)
lazy val allSettings = baseSettings ++ buildSettings ++ publishSettings
lazy val noPublish = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)
lazy val root = project.in(file("."))
.settings(allSettings)
.settings(noPublish)
.aggregate(sprayjson)
lazy val sprayjson = project
.settings(moduleName := "finch-sprayjson")
.settings(allSettings)