forked from profunktor/fs2-rabbit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
158 lines (140 loc) · 4.8 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
import com.scalapenos.sbt.prompt.SbtPrompt.autoImport._
import com.scalapenos.sbt.prompt._
import Dependencies._
import microsites.ExtraMdFileConfig
name := """fs2-rabbit-root"""
organization in ThisBuild := "com.github.gvolpe"
version in ThisBuild := "0.8"
crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.6")
sonatypeProfileName := "com.github.gvolpe"
promptTheme := PromptTheme(List(
text("[SBT] ", fg(136)),
text(_ => "fs2-rabbit", fg(64)).padRight(" λ ")
))
val commonSettings = Seq(
organizationName := "Fs2 Rabbit",
startYear := Some(2017),
licenses += ("Apache-2.0", new URL("https://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("https://github.com/gvolpe/fs2-rabbit")),
addCompilerPlugin("org.spire-math" % "kind-projector" % "0.9.5" cross CrossVersion.binary),
libraryDependencies ++= Seq(
Libraries.amqpClient,
Libraries.catsEffect,
Libraries.fs2Core,
Libraries.scalaTest,
Libraries.scalaCheck
),
resolvers += "Apache public" at "https://repository.apache.org/content/groups/public/",
scalacOptions ++= Seq(
"-Xmax-classfile-name", "80",
"-deprecation",
"-encoding",
"UTF-8",
"-feature",
"-Ypartial-unification",
"-language:existentials",
"-language:higherKinds"
),
scalafmtOnCompile := true,
coverageExcludedPackages := "com\\.github\\.gvolpe\\.fs2rabbit\\.examples.*;com\\.github\\.gvolpe\\.fs2rabbit\\.util.*;.*QueueName*;.*RoutingKey*;.*ExchangeName*;.*DeliveryTag*;.*AMQPClientStream*;.*ConnectionStream*;",
publishTo := {
val sonatype = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at sonatype + "content/repositories/snapshots")
else
Some("releases" at sonatype + "service/local/staging/deploy/maven2")
},
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
pomExtra :=
<developers>
<developer>
<id>gvolpe</id>
<name>Gabriel Volpe</name>
<url>http://github.com/gvolpe</url>
</developer>
</developers>
)
val CoreDependencies: Seq[ModuleID] = Seq(
Libraries.logback % "test"
)
val JsonDependencies: Seq[ModuleID] = Seq(
Libraries.circeCore,
Libraries.circeGeneric,
Libraries.circeParser
)
val ExamplesDependencies: Seq[ModuleID] = Seq(
Libraries.monix,
Libraries.logback % "runtime"
)
lazy val noPublish = Seq(
publish := {},
publishLocal := {},
publishArtifact := false,
skip in publish := true
)
lazy val `fs2-rabbit-root` = project.in(file("."))
.aggregate(`fs2-rabbit`, `fs2-rabbit-circe`, examples, microsite)
.settings(noPublish)
lazy val `fs2-rabbit` = project.in(file("core"))
.settings(commonSettings: _*)
.settings(libraryDependencies ++= CoreDependencies)
.settings(parallelExecution in Test := false)
.enablePlugins(AutomateHeaderPlugin)
lazy val `fs2-rabbit-circe` = project.in(file("json-circe"))
.settings(commonSettings: _*)
.settings(libraryDependencies ++= JsonDependencies)
.settings(parallelExecution in Test := false)
.enablePlugins(AutomateHeaderPlugin)
.dependsOn(`fs2-rabbit`)
lazy val examples = project.in(file("examples"))
.settings(commonSettings: _*)
.settings(libraryDependencies ++= ExamplesDependencies)
.settings(noPublish)
.enablePlugins(AutomateHeaderPlugin)
.dependsOn(`fs2-rabbit`, `fs2-rabbit-circe`)
lazy val microsite = project.in(file("site"))
.enablePlugins(MicrositesPlugin)
.settings(commonSettings: _*)
.settings(noPublish)
.settings(
micrositeName := "Fs2 Rabbit",
micrositeDescription := "RabbitMQ stream-based client",
micrositeAuthor := "Gabriel Volpe",
micrositeGithubOwner := "gvolpe",
micrositeGithubRepo := "fs2-rabbit",
micrositeBaseUrl := "/fs2-rabbit",
micrositeExtraMdFiles := Map(
file("README.md") -> ExtraMdFileConfig(
"index.md",
"home",
Map("title" -> "Home", "position" -> "0")
)
),
micrositePalette := Map(
"brand-primary" -> "#E05236",
"brand-secondary" -> "#774615",
"brand-tertiary" -> "#2f2623",
"gray-dark" -> "#453E46",
"gray" -> "#837F84",
"gray-light" -> "#E3E2E3",
"gray-lighter" -> "#F4F3F4",
"white-color" -> "#FFFFFF"
),
micrositeGitterChannel := true,
micrositeGitterChannelUrl := "fs2-rabbit/fs2-rabbit",
micrositePushSiteWith := GitHub4s,
micrositeGithubToken := sys.env.get("GITHUB_TOKEN"),
fork in tut := true,
scalacOptions in Tut --= Seq(
"-Xfatal-warnings",
"-Ywarn-unused-import",
"-Ywarn-numeric-widen",
"-Ywarn-dead-code",
"-Xlint:-missing-interpolator,_",
)
)
.dependsOn(`fs2-rabbit`, `fs2-rabbit-circe`, `examples`)
// CI build
addCommandAlias("buildFs2Rabbit", ";clean;+coverage;+test;+coverageReport;+coverageAggregate;tut")