-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.sbt
123 lines (104 loc) · 3.65 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
import com.typesafe.sbt.packager.docker.{Cmd, ExecCmd}
val Versions = new {
val akka = "2.4.12"
val `akka-http` = "10.0.0-RC2"
}
lazy val commonSettings = Seq(
organization := "de.aktey.akka.visualmailbox",
scalaVersion := "2.12.0",
crossScalaVersions := Seq("2.11.8", "2.12.0"),
scalacOptions ++= Seq("-deprecation", "-feature"),
homepage := Some(url("https://github.com/ouven/akka-visualmailbox/wiki")),
licenses := Seq(
"Apache License Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"),
"The New BSD License" -> url("http://www.opensource.org/licenses/bsd-license.html")
),
sources in EditSource ++= (baseDirectory.value / ".doctmpl" / "README.md").get,
targetDirectory in EditSource := baseDirectory.value,
variables in EditSource += "version" -> version.value,
// release with sbt-pgp plugin
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseProcess := ReleaseProcess.steps,
releaseCrossBuild := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
pomExtra := <issueManagement>
<system>github</system>
<url>https://github.com/ouven/akka-visualmailbox/issues</url>
</issueManagement>
<developers>
<developer>
<name>Ruben Wagner</name>
<url>https://github.com/ouven</url>
<roles>
<role>owner</role>
<role>developer</role>
</roles>
<timezone>+1</timezone>
</developer>
</developers>
<scm>
<url>[email protected]:ouven/akka-visualmailbox.git</url>
<connection>scm:git:[email protected]:ouven/akka-visualmailbox.git</connection>
<developerConnection>scm:git:[email protected]:ouven/akka-visualmailbox.git</developerConnection>
</scm>,
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % Versions.akka
)
)
lazy val `akka-visualmailbox` = project.in(file("."))
.aggregate(collector, common, visualization)
.settings(commonSettings: _*)
.settings(Seq(
publishArtifact := false
))
lazy val common = project
.settings(commonSettings: _*)
.settings(Seq(
libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.13.4" % "test"
)
))
lazy val collector = project
.dependsOn(common)
.settings(commonSettings: _*)
.settings(Seq())
lazy val visualization = project
.enablePlugins(JavaAppPackaging)
.dependsOn(common)
.settings(commonSettings: _*)
.settings(Seq(
resolvers += Resolver.bintrayRepo("hseeberger", "maven"),
publishArtifact := false,
libraryDependencies ++= Seq(
"de.heikoseeberger" %% "akka-sse" % "2.0.0-M4",
"com.typesafe.akka" %% "akka-http" % Versions.`akka-http`,
"com.typesafe.akka" %% "akka-slf4j" % Versions.akka,
"ch.qos.logback" % "logback-classic" % "1.1.7"
),
dockerBaseImage := "java:jre-alpine",
dockerExposedPorts := Seq(8080, 60009),
packageName in Docker := "ouven/akka-visual-mailbox-visualization",
dockerCommands := {
val insertPoint = 2
dockerCommands.value.take(insertPoint) ++ Seq(
Cmd("USER", "root"),
ExecCmd("RUN", "apk", "--update", "add", "bash")
) ++ dockerCommands.value.drop(insertPoint)
},
dockerUpdateLatest := !version.value.endsWith("SNAPSHOT")
))
lazy val `sample-project` = project
.dependsOn(collector)
.settings(commonSettings: _*)
.settings(Seq(
publishArtifact := false
))