forked from ReactivePlatform/Reactive-Design-Patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
157 lines (124 loc) · 4.46 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
import com.typesafe.sbt.SbtGit.GitKeys
import com.typesafe.sbt.git.DefaultReadableGit
organization in ThisBuild := "com.reactivedesignpatterns"
name := "ReactiveDesignPatterns"
version in ThisBuild := "1.0.0"
scalacOptions in Compile ++= Seq("-encoding", "UTF-8", "-target:jvm-1.8", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint")
javacOptions in compile ++= Seq("-encoding", "UTF-8", "-source", "1.8", "-target", "1.8", "-Xlint:unchecked", "-XDignore.symbol.file")
conflictWarning := conflictWarning.value.copy(failOnConflict = false)
//javaFormattingSettingsFilename in ThisBuild := "formatting-java.xml"
//sourceLevel in ThisBuild := Some("1.8")
//targetLevel in ThisBuild := Some("1.8")
enablePlugins(spray.boilerplate.BoilerplatePlugin)
enablePlugins(AutomateHeaderPlugin)
lazy val ReactiveDesignPatterns = (project in file("."))
.aggregate(docs)
.enablePlugins(AutomateHeaderPlugin)
.settings(Build.sharedSettings: _*)
lazy val common = project
.enablePlugins(AutomateHeaderPlugin)
.settings(Build.sharedSettings: _*)
lazy val chapter02 = project.dependsOn(common)
.enablePlugins(AutomateHeaderPlugin)
.settings(Build.sharedSettings: _*)
.settings(
libraryDependencies ++= Seq(
Dependencies.akka25Actor,
Dependencies.guava
)
)
lazy val chapter03 = project
.enablePlugins(AutomateHeaderPlugin)
.settings(Build.sharedSettings: _*)
lazy val chapter07 = project
.enablePlugins(AutomateHeaderPlugin)
.settings(Build.sharedSettings: _*)
lazy val chapter11 = project.dependsOn(common)
.enablePlugins(AutomateHeaderPlugin)
.settings(Build.sharedSettings: _*)
.settings(
libraryDependencies ++= Seq(
Dependencies.akka25Testkit,
Dependencies.scalatest,
Dependencies.scalaAsync
)
)
lazy val chapter12 = project.dependsOn(common)
.enablePlugins(AutomateHeaderPlugin)
.settings(Build.sharedSettings: _*)
.settings(
libraryDependencies ++= Seq(
Dependencies.akka25Actor
)
)
lazy val chapter13 = project.dependsOn(common)
.enablePlugins(AutomateHeaderPlugin)
.settings(Build.sharedSettings: _*)
.settings(
libraryDependencies ++= Seq(
Dependencies.akka25Contrib,
Dependencies.akka25DData,
Dependencies.playJson,
Dependencies.fasterxml,
Dependencies.sbtIO,
Dependencies.akka25Testkit,
Dependencies.finagle,
Dependencies.junit,
Dependencies.scalatest) ++ Dependencies.ckites
)
lazy val chapter14 = project.dependsOn(common)
.enablePlugins(AutomateHeaderPlugin)
.settings(Build.sharedSettings: _*)
lazy val chapter15 = project.dependsOn(common)
.enablePlugins(AutomateHeaderPlugin)
.settings(Build.sharedSettings: _*)
lazy val chapter16 = project.dependsOn(common)
.enablePlugins(AutomateHeaderPlugin)
.settings(Build.sharedSettings: _*)
lazy val chapter17 = project.dependsOn(common)
.enablePlugins(AutomateHeaderPlugin)
.settings(Build.sharedSettings: _*)
headerLicense := Some(HeaderLicense.Custom(
s"""|Copyright (c) 2018 https://www.reactivedesignpatterns.com/ ${"\n"}
|Copyright (c) 2018 https://rdp.reactiveplatform.xyz/
|
|""".stripMargin
))
lazy val docs = project.aggregate(
chapter02,
chapter03,
chapter07,
chapter11,
chapter12,
chapter13,
chapter14,
chapter15,
chapter16,
chapter17)
.enablePlugins(GhpagesPlugin)
.enablePlugins(ParadoxSitePlugin)
.enablePlugins(ParadoxMaterialThemePlugin)
.settings(Build.sharedSettings: _*)
.settings(
git.remoteRepo := "https://github.com/ReactivePlatform/reactive-design-patterns-cn.git",
GitKeys.gitReader in ThisProject := baseDirectory(base => new DefaultReadableGit(base)).value,
excludeFilter in ghpagesCleanSite :=
new FileFilter {
def accept(f: File) = (ghpagesRepository.value / "CNAME").getCanonicalPath == f.getCanonicalPath
} || "versions.html",
ParadoxMaterialThemePlugin.paradoxMaterialThemeSettings(Paradox),
paradoxProperties in Compile ++= Map(
"project.name" -> "ReactiveDesignPatterns",
"github.base_url" -> "https://github.com/ReactivePlatform/reactive-design-patterns-cn"
),
paradoxMaterialTheme in Compile ~= {
_.withColor("red", "pink")
.withLogoIcon("cloud")
.withCopyright("Copyleft © 2018 rdp.reactiveplatform.xyz")
.withRepository(uri("https://github.com/ReactivePlatform/reactive-design-patterns-cn"))
.withSearch(tokenizer = "[\\s\\-\\.]+")
.withSocial(
uri("https://github.com/hepin1989")
)
}
)