-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sbt
160 lines (149 loc) · 4.68 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
import Dependencies._
import sbt.Keys._
import com.typesafe.sbt.SbtScalariform
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
import scalariform.formatter.preferences._
// Common variables
lazy val commonSettings = Seq(
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.11.8", "2.12.2"),
organization := "nl.stormlantern",
version := "0.4.0-SNAPSHOT",
resolvers ++= Dependencies.resolutionRepos,
scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature")
)
lazy val reactiveConsul = (project in file("."))
.settings( commonSettings: _* )
.settings( publishSettings: _* )
.aggregate(client, dnsHelper, dockerTestkit/*, example*/)
lazy val dnsHelper = (project in file("dns-helper"))
.settings( commonSettings: _* )
.settings( publishSettings: _* )
.settings(
name := "reactive-consul-dns",
publishArtifact in Compile := true,
publishArtifact in makePom := true,
publishArtifact in Test := false,
publishArtifact in IntegrationTest := false,
fork := true,
libraryDependencies ++= Seq(
spotifyDns
),
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentClassDeclaration, true)
.setPreference(DanglingCloseParenthesis, Preserve)
.setPreference(RewriteArrowSymbols, true)
)
lazy val client = (project in file("client"))
.settings( commonSettings: _* )
.settings( publishSettings: _* )
.settings(
name := "reactive-consul",
publishArtifact in Compile := true,
publishArtifact in makePom := true,
publishArtifact in Test := false,
publishArtifact in IntegrationTest := false,
fork := true,
libraryDependencies ++= Seq(
akkaHttp,
sprayJson,
akkaActor,
slf4j,
akkaSlf4j,
scalaTest % "it,test",
scalaMock % "test",
logback % "it,test",
akkaTestKit % "it,test",
spotifyDocker % "it,test"
),
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentClassDeclaration, true)
.setPreference(DanglingCloseParenthesis, Preserve)
.setPreference(RewriteArrowSymbols, true)
)
.configs( IntegrationTest )
.settings( Defaults.itSettings : _* )
.settings( SbtScalariform.scalariformSettingsWithIt : _* )
.dependsOn(dockerTestkit % "it-internal")
lazy val dockerTestkit = (project in file("docker-testkit"))
.settings( commonSettings: _* )
.settings(
libraryDependencies ++= Seq(
slf4j,
scalaTest,
spotifyDocker
)
)
.configs( IntegrationTest )
.settings( Defaults.itSettings : _* )
.settings( SbtScalariform.scalariformSettingsWithIt : _* )
.settings( publishSettings: _* )
//lazy val example = (project in file("example"))
// .aggregate(client)
// .dependsOn(client, dnsHelper)
// .settings( commonSettings: _* )
// .settings(
// crossScalaVersions := Seq()
// )
// .settings(
// libraryDependencies ++= Seq(
// sprayClient,
// sprayRouting,
// sprayJson,
// slf4j,
// logback
// )
// )
// .settings(
// fork := true,
// libraryDependencies ++= Seq(
// akkaActor,
// sprayClient,
// sprayJson
// )
// )
// .settings( publishSettings: _* )
// .enablePlugins(JavaAppPackaging)
// .settings(
// packageName in Docker := "reactive-consul-example",
// maintainer in Docker := "Dirk Louwers <[email protected]>",
// dockerExposedPorts in Docker := Seq(8080),
// dockerExposedVolumes in Docker := Seq("/opt/docker/logs")
// )
lazy val publishSettings = Seq(
publishArtifact := false,
publishMavenStyle := true,
pomIncludeRepository := { _ => false },
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
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")
},
pomExtra := (
<url>http://github.com/dlouwers/reactive-consul</url>
<licenses>
<license>
<name>MIT</name>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:dlouwers/reactive-consul.git</url>
<connection>scm:[email protected]:dlouwers/reactive-consul.git</connection>
</scm>
<developers>
<developer>
<id>dlouwers</id>
<name>Dirk Louwers</name>
<url>http://github.com/dlouwers</url>
</developer>
</developers>
)
)
Revolver.settings.settings