-
Notifications
You must be signed in to change notification settings - Fork 72
/
build.sbt
157 lines (139 loc) · 5.06 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 java.util.Properties
val json4sVersion = "3.6.6"
val circeVersion = "0.12.3"
val akkaVersion = "2.5.25"
val playVersion = "2.7.4"
val appProperties = {
val prop = new Properties()
IO.load(prop, new File("project/version.properties"))
prop
}
val assertNoApplicationConf = taskKey[Unit]("Makes sure application.conf isn't packaged")
val commonSettings = Seq(
organization := "com.spingo",
version := appProperties.getProperty("version"),
scalaVersion := "2.12.10",
crossScalaVersions := Seq("2.12.10", "2.13.1"),
libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.3.3",
"com.typesafe" % "config" % "1.3.4",
"com.newmotion" %% "akka-rabbitmq" % "5.1.2",
"org.slf4j" % "slf4j-api" % "1.7.26",
"ch.qos.logback" % "logback-classic" % "1.2.3" % "test",
"org.scalatest" %% "scalatest" % "3.0.8" % "test",
"com.spingo" %% "scoped-fixtures" % "2.0.0" % "test",
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion % "test"
),
publishMavenStyle := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
licenses := Seq("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("https://github.com/SpinGo/op-rabbit")),
pomExtra := {
<scm>
<url>https://github.com/SpinGo/op-rabbit</url>
<connection>scm:git:[email protected]:SpinGo/op-rabbit.git</connection>
</scm>
<developers>
<developer>
<id>timcharper</id>
<name>Tim Harper</name>
<url>http://spingo.com</url>
</developer>
</developers>
},
autoAPIMappings := true // sbt-unidoc setting
)
lazy val `op-rabbit` = (project in file(".")).
enablePlugins(ScalaUnidocPlugin).
settings(commonSettings: _*).
settings(
description := "The opinionated Rabbit-MQ plugin",
name := "op-rabbit").
dependsOn(core).
aggregate(core, `play-json`, airbrake, `akka-stream`, json4s, `spray-json`, circe, upickle)
lazy val core = (project in file("./core")).
enablePlugins(spray.boilerplate.BoilerplatePlugin).
settings(commonSettings: _*).
settings(
name := "op-rabbit-core"
)
lazy val demo = (project in file("./demo")).
settings(commonSettings: _*).
settings(
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.1.7",
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion)).
settings(
name := "op-rabbit-demo"
).
dependsOn(
`play-json`, `akka-stream`)
lazy val json4s = (project in file("./addons/json4s")).
settings(commonSettings: _*).
settings(
name := "op-rabbit-json4s",
libraryDependencies ++= Seq(
"org.json4s" %% "json4s-ast" % json4sVersion,
"org.json4s" %% "json4s-core" % json4sVersion,
"org.json4s" %% "json4s-jackson" % json4sVersion % "provided",
"org.json4s" %% "json4s-native" % json4sVersion % "provided")).
dependsOn(core)
lazy val `play-json` = (project in file("./addons/play-json")).
settings(commonSettings: _*).
settings(
name := "op-rabbit-play-json",
libraryDependencies += "com.typesafe.play" %% "play-json" % playVersion).
dependsOn(core)
lazy val `spray-json` = (project in file("./addons/spray-json")).
settings(commonSettings: _*).
settings(
name := "op-rabbit-spray-json",
libraryDependencies += "io.spray" %% "spray-json" % "1.3.5").
dependsOn(core)
lazy val upickle = (project in file("./addons/upickle")).
settings(commonSettings: _*).
settings(
name := "op-rabbit-upickle",
libraryDependencies += "com.lihaoyi" %% "upickle" % (
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 11)) => "0.7.4"
case _ => "0.8.0"
}
)).
dependsOn(core)
lazy val airbrake = (project in file("./addons/airbrake/")).
settings(commonSettings: _*).
settings(
name := "op-rabbit-airbrake",
libraryDependencies += "io.airbrake" % "airbrake-java" % "2.2.8").
dependsOn(core)
lazy val `akka-stream` = (project in file("./addons/akka-stream")).
settings(commonSettings: _*).
settings(
name := "op-rabbit-akka-stream",
libraryDependencies ++= Seq(
"com.timcharper" %% "acked-streams" % "2.1.1",
"com.typesafe.akka" %% "akka-stream" % akkaVersion),
unmanagedResourceDirectories in Test ++= Seq(
file(".").getAbsoluteFile / "core" / "src" / "test" / "resources"),
unmanagedSourceDirectories in Test ++= Seq(
file(".").getAbsoluteFile / "core" / "src" / "test" / "scala" / "com" / "spingo" / "op_rabbit" / "helpers")).
dependsOn(core)
lazy val circe = (project in file("./addons/circe")).
settings(commonSettings: _*).
settings(
name := "op-rabbit-circe",
libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion
)).
dependsOn(core)