This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
/
build.sbt
112 lines (89 loc) · 3.02 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
import ReactiveBuild._
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.13")
scalaVersion in ThisBuild := "2.12.13"
organization in ThisBuild := "cc.co.scala-reactive"
scalacOptions in ThisBuild ++=
Seq(
"-deprecation",
"-feature",
"-unchecked",
"-Xlint",
"-Ywarn-unused-import",
"-Ywarn-unused",
"-Ywarn-value-discard"
)
enablePlugins(ScalaUnidocPlugin)
unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects(routingJS, web_demo)
lazy val core = (project in file("reactive-core"))
.settings(publishingSettings: _*)
lazy val routing = (crossProject(JVMPlatform, JSPlatform).crossType(CrossType.Full) in file("reactive-routing"))
.settings(
name := "reactive-routing",
description := "Type safe routing library",
scalacOptions in(Compile, doc) ++= Seq("-implicits", "-implicits-show-all"),
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.4" % Test,
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.15.2" % Test
)
.settings(publishingSettings: _*)
lazy val routingJS = routing.js
lazy val routingJVM = routing.jvm
lazy val transport = (project in file("reactive-transport"))
.settings(publishingSettings: _*)
.dependsOn(core)
lazy val jsdsl = (project in file("reactive-jsdsl"))
.settings(publishingSettings: _*)
.dependsOn(transport)
lazy val web_base = (project in file("reactive-web"))
.settings(publishingSettings: _*)
.dependsOn(core, jsdsl)
lazy val web_html = (project in file("reactive-web-html"))
.settings(publishingSettings: _*)
.dependsOn(web_base)
lazy val web_widgets = (project in file("reactive-web-widgets"))
.settings(publishingSettings: _*)
.dependsOn(web_html)
lazy val web = (project in file("reactive-web-aggregated"))
.settings(publishingSettings: _*)
.settings(name := "reactive-web")
.dependsOn(web_widgets)
lazy val web_lift = (project in file("reactive-web-lift"))
.settings(publishingSettings: _*)
.dependsOn(web_widgets, routingJVM)
lazy val web_demo = (project in file("reactive-web-demo"))
.settings(nonPublishingSettings: _*)
.dependsOn(web_lift)
.settings(
webappPostProcess := {
val projsDocs =
Def.task {
(projectID.value.name, (Compile / doc).value)
}
.all(
ScopeFilter(inProjects(core, routingJVM, transport, jsdsl, web_base, web_html, web_widgets, web, web_lift))
)
.value
val unidocs = (root / ScalaUnidoc / doc).value
{ outDir =>
val docs = outDir / "api"
println("Copying docs to " + docs)
for ((proj, doc) <- projsDocs)
IO.copyDirectory(doc, docs / proj)
IO.copyDirectory(unidocs, docs / "unidoc")
}
}
)
lazy val root: Project = (project in file("."))
.settings(name := "reactive-root", nonPublishingSettings)
.aggregate(
core,
transport,
jsdsl,
web_base,
routingJS,
routingJVM,
web_html,
web_widgets,
web,
web_lift
)