forked from akka/akka-http
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
167 lines (149 loc) · 5.49 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm
import akka._
import AkkaDependency._
inThisBuild(Def.settings(
organization := "com.typesafe.akka",
organizationName := "Lightbend",
organizationHomepage := Some(url("https://www.lightbend.com")),
homepage := Some(url("http://akka.io")),
apiURL := {
val apiVersion = if (isSnapshot.value) "current" else version.value
Some(url(s"http://doc.akka.io/api/akka-http/$apiVersion/"))
},
scmInfo := Some(
ScmInfo(url("https://github.com/akka/akka-http"), "[email protected]:akka/akka-http.git")),
developers := List(
Developer("contributors", "Contributors", "[email protected]",
url("https://github.com/akka/akka-http/graphs/contributors"))
),
startYear := Some(2014),
// test in assembly := {},
licenses := Seq("Apache-2.0" -> url("https://opensource.org/licenses/Apache-2.0")),
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8", // yes, this is 2 args
"-unchecked",
"-Xlint",
// "-Yno-adapted-args", //akka-http heavily depends on adapted args and => Unit implicits break otherwise
"-Ywarn-dead-code"
// "-Xfuture" // breaks => Unit implicits
),
javacOptions ++= Seq(
"-encoding", "UTF-8"
),
testOptions += Tests.Argument(TestFrameworks.JUnit, "-q", "-v"),
Dependencies.Versions,
Formatting.formatSettings,
shellPrompt := { s => Project.extract(s).currentProject.id + " > " }
))
lazy val root = Project(
id = "root",
base = file(".")
)
.enablePlugins(UnidocRoot, NoPublish, DeployRsync)
.disablePlugins(BintrayPlugin, MimaPlugin)
.settings(
// Unidoc doesn't like macros
unidocProjectExcludes := Seq(parsing),
deployRsyncArtifact :=
(sbtunidoc.Plugin.UnidocKeys.unidoc in Compile).value zip Seq(s"www/api/akka-http/${version.value}", s"www/japi/akka-http/${version.value}")
)
.aggregate(
parsing,
httpCore,
http2Support,
http,
httpTestkit,
httpTests,
httpMarshallersScala,
httpMarshallersJava,
docs
)
lazy val parsing = project("akka-parsing")
.settings(Dependencies.parsing)
.settings(
scalacOptions := scalacOptions.value.filterNot(_ == "-Xfatal-warnings")
)
lazy val httpCore = project("akka-http-core")
.settings(Dependencies.httpCore)
.settings(Version.versionSettings)
.dependsOn(parsing)
.addAkkaModuleDependency("akka-stream")
.addAkkaModuleDependency("akka-stream-testkit", "test")
lazy val http = project("akka-http")
.dependsOn(httpCore)
lazy val http2Support = project("akka-http2-support")
.dependsOn(httpCore, httpTestkit % "test", httpCore % "test->test")
.addAkkaModuleDependency("akka-stream-testkit", "test")
lazy val httpTestkit = project("akka-http-testkit")
.settings(Dependencies.httpTestkit)
.dependsOn(http)
.addAkkaModuleDependency("akka-stream-testkit")
lazy val httpTests = project("akka-http-tests")
.settings(Dependencies.httpTests)
.dependsOn(httpSprayJson, httpXml, httpJackson,
httpTestkit % "test", httpCore % "test->test")
.enablePlugins(NoPublish).disablePlugins(BintrayPlugin) // don't release tests
.enablePlugins(MultiNode)
.disablePlugins(MimaPlugin) // this is only tests
.configs(MultiJvm)
.addAkkaModuleDependency("akka-multi-node-testkit", "test")
lazy val httpMarshallersScala = project("akka-http-marshallers-scala")
.enablePlugins(NoPublish)
.disablePlugins(BintrayPlugin, MimaPlugin)
.aggregate(httpSprayJson, httpXml)
lazy val httpXml =
httpMarshallersScalaSubproject("xml")
lazy val httpSprayJson =
httpMarshallersScalaSubproject("spray-json")
lazy val httpMarshallersJava = project("akka-http-marshallers-java")
.enablePlugins(NoPublish)
.disablePlugins(BintrayPlugin, MimaPlugin)
.aggregate(httpJackson)
lazy val httpJackson =
httpMarshallersJavaSubproject("jackson")
def project(name: String) =
Project(id = name, base = file(name))
def httpMarshallersScalaSubproject(name: String) =
Project(
id = s"akka-http-$name",
base = file(s"akka-http-marshallers-scala/akka-http-$name"),
dependencies = Seq(http)
)
def httpMarshallersJavaSubproject(name: String) =
Project(
id = s"akka-http-$name",
base = file(s"akka-http-marshallers-java/akka-http-$name"),
dependencies = Seq(http)
)
lazy val docs = project("docs")
.enablePlugins(ParadoxPlugin, NoPublish, DeployRsync)
.disablePlugins(BintrayPlugin, MimaPlugin)
.dependsOn(
httpCore, http, httpXml, httpMarshallersJava, httpMarshallersScala,
httpTests % "compile;test->test", httpTestkit % "compile;test->test"
)
.settings(Dependencies.docs)
.settings(
name := "akka-http-docs",
paradoxTheme := Some(builtinParadoxTheme("generic")),
paradoxNavigationDepth := 3,
paradoxProperties in Compile ++= Map(
"akka.version" -> Dependencies.akkaVersion,
"scala.binaryVersion" -> scalaBinaryVersion.value,
"scala.version" -> scalaVersion.value,
"scaladoc.version" -> scalaVersion.value,
"crossString" -> (scalaVersion.value match {
case akka.Doc.BinVer(_) => ""
case _ => "cross CrossVersion.full"
}),
"extref.akka-docs.base_url" -> s"http://doc.akka.io/docs/akka/${Dependencies.akkaVersion}/%s",
"javadoc.akka.http.base_url" -> {
val v = if (isSnapshot.value) "current" else version.value
s"http://doc.akka.io/japi/akka-http/$v"
},
"github.base_url" -> GitHub.url(version.value)
),
Formatting.docFormatSettings,
deployRsyncArtifact := List((paradox in Compile).value -> s"www/docs/akka-http/${version.value}")
)