-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
143 lines (130 loc) · 4.55 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import Dependencies._
import xerial.sbt.Sonatype._
import ReleaseTransformations._
lazy val scala212 = "2.12.8"
lazy val scala211 = "2.11.12"
lazy val commons = Seq(
organization := "com.github.andyglow",
name := "json-facade",
homepage := Some(new URL("http://github.com/andyglow/json-facade")),
startYear := Some(2019),
organizationName := "andyglow",
publishTo := sonatypePublishTo.value,
licenses := Seq(("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))),
resolvers += Resolver.url("scoverage-bintray", url("https://dl.bintray.com/sksamuel/sbt-plugins/"))(Resolver.ivyStylePatterns),
sonatypeProfileName := "com.github.andyglow",
sonatypeProjectHosting := Some(
GitHubHosting(
"andyglow",
"json-facade",
"andyglow@gmail.com")),
scmInfo := Some(
ScmInfo(
url("https://github.com/andyglow/json-facade"),
"scm:git@github.com:andyglow/json-facade.git")),
developers := List(
Developer(
id = "andyglow",
name = "Andriy Onyshchuk",
email = "andyglow@gmail.com",
url = url("https://ua.linkedin.com/in/andyglow"))),
releaseCrossBuild := true,
scalaVersion := scala211,
publishMavenStyle := true,
publishArtifact := true,
crossScalaVersions := List(scala212, scala211),
scalacOptions ++= {
val options = Seq(
"-encoding", "UTF-8",
"-feature",
"-unchecked",
"-deprecation",
"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Xfuture")
// WORKAROUND https://github.com/scala/scala/pull/5402
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 12)) => options.map {
case "-Xlint" => "-Xlint:-unused,_"
case "-Ywarn-unused-import" => "-Ywarn-unused:imports,-patvars,-privates,-locals,-params,-implicits"
case other => other
}
case _ => options
}
},
releaseCrossBuild := true, // true if you cross-build the project for multiple Scala versions
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges),
libraryDependencies ++= Seq(scalatest % Test))
lazy val api = project.in(file("api"))
.settings(
commons,
name := "json-facade-api")
lazy val playF = project.in(file("impl-play-json"))
.dependsOn(api % "compile->compile;test->test")
.settings(
commons,
name := "json-facade-play-json",
libraryDependencies += playJson)
lazy val circeF = project.in(file("impl-circe"))
.dependsOn(api % "compile->compile;test->test")
.settings(
commons,
name := "json-facade-circe",
libraryDependencies ++= circe.libs)
lazy val sprayF = project.in(file("impl-spray"))
.dependsOn(api % "compile->compile;test->test")
.settings(
commons,
name := "json-facade-spray",
libraryDependencies += sprayJson)
lazy val json4sNativeF = project.in(file("impl-json4s-native"))
.dependsOn(api % "compile->compile;test->test")
.settings(
commons,
name := "json-facade-json4s-native",
libraryDependencies ++= Seq(json4s.ast, json4s.native))
lazy val json4sJacksonF = project.in(file("impl-json4s-jackson"))
.dependsOn(api % "compile->compile;test->test")
.settings(
commons,
name := "json-facade-json4s-jackson",
libraryDependencies ++= Seq(json4s.ast, json4s.jackson))
lazy val uJsonF = project.in(file("impl-ujson"))
.dependsOn(api % "compile->compile;test->test")
.settings(
commons,
name := "json-facade-ujson",
libraryDependencies ++= Seq(lihaoiy.uJson, lihaoiy.uPickle))
lazy val jsoniterF = project.in(file("impl-jsoniter"))
.dependsOn(api % "compile->compile;test->test")
.settings(
commons,
name := "json-facade-jsoniter",
libraryDependencies ++= jsoniter.libs)
lazy val akkaHttpAdapter = project.in(file("adapter-akka-http"))
.dependsOn(api % "compile->compile;test->test", playF % "compile->test")
.settings(
commons,
name := "json-facade-akka-http",
libraryDependencies ++= Seq(akka.http, akka.actor % Provided, akka.stream % Provided, playJson % Test))
lazy val root = project.in(file("."))
.aggregate(api, playF, circeF, sprayF, json4sNativeF, json4sJacksonF, uJsonF, jsoniterF, akkaHttpAdapter)
.settings(
commons,
name := "json-facade",
aggregate in update := false)