forked from naferx/akka-stream-checkpoint
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sbt
103 lines (92 loc) · 3.53 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
val commonSettings = Seq(
organization := "com.github.svezfaz",
description := "Checkpoint stage to monitor Akka Streams streaming applications",
crossScalaVersions := Seq("2.12.6", "2.11.12"),
scalaVersion := crossScalaVersions.value.head,
scalacOptions in Compile ++= Seq(
"-encoding", "UTF-8",
"-target:jvm-1.8",
"-feature",
"-deprecation",
"-unchecked",
"-Xlint",
"-Xfuture",
"-Xfatal-warnings",
"-Ywarn-dead-code",
"-Ywarn-unused-import",
"-Ywarn-unused",
"-Ywarn-nullary-unit"
),
scmInfo := Some(
ScmInfo(url("https://github.com/svezfaz/akka-stream-checkpoint"),
"scm:git:[email protected]:svezfaz/akka-stream-checkpoint.git")
),
resolvers += Resolver.bintrayRepo("marshallpierce", "maven")
)
lazy val publishSettings = Seq(
homepage := Some(url("https://github.com/svezfaz/akka-stream-checkpoint/")),
licenses := Seq("Apache-2.0" → url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
autoAPIMappings := true,
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ ⇒ false },
publishTo := sonatypePublishTo.value,
pomExtra := (
<developers>
<developer>
<id>svezfaz</id>
<name>Stefano Bonetti</name>
<url>https://github.com/svezfaz/akka-stream-checkpoint/</url>
</developer>
</developers>
)
)
lazy val noPublish = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)
lazy val root = project.in(file("."))
.settings(
commonSettings,
noPublish,
publishTo := Some(Resolver.file("Unused transient repository", file("target/unusedrepo")))
)
.aggregate(core, dropwizard, kamon, benchmarks, demo, docs)
lazy val core = checkpointProject("core", Dependencies.core)
lazy val dropwizard = checkpointProject("dropwizard", Dependencies.dropwizard)
.dependsOn(core)
lazy val kamon = checkpointProject("kamon", Dependencies.kamon)
.dependsOn(core)
lazy val benchmarks = checkpointProject("benchmarks", noPublish)
.enablePlugins(JmhPlugin)
.dependsOn(dropwizard, kamon)
lazy val demo = checkpointProject("demo", noPublish, Dependencies.docs)
.dependsOn(dropwizard, kamon)
lazy val docs =
checkpointProject(
"docs",
noPublish,
paradoxTheme := Some(builtinParadoxTheme("generic")),
paradoxNavigationDepth := 3,
paradoxProperties ++= Map(
"version" → version.value,
"akkaVersion" → Dependencies.akkaVersion,
"scalaVersion" → scalaVersion.value,
"scalaBinaryVersion" → scalaBinaryVersion.value,
"dropwizardVersion" → Dependencies.dropwizardVersion,
"kamonVersion" → Dependencies.kamonVersion,
"extref.akka-docs.base_url" → s"http://doc.akka.io/docs/akka/${Dependencies.akkaVersion}/%s",
"extref.dw-docs.base_url" → s"http://metrics.dropwizard.io/${Dependencies.dropwizardVersion}/getting-started",
"extref.kamon-docs.base_url" → "http://kamon.io/documentation/1.x"
),
sourceDirectory in Paradox := sourceDirectory.value / "main" / "paradox",
git.remoteRepo := "[email protected]:svezfaz/akka-stream-checkpoint.git"
)
.enablePlugins(ParadoxPlugin, ParadoxSitePlugin, GhpagesPlugin)
.dependsOn(dropwizard, kamon)
def checkpointProject(projectId: String, additionalSettings: sbt.Def.SettingsDefinition*): Project =
Project(id = projectId, base = file(projectId))
.settings(commonSettings, publishSettings)
.settings(name := s"akka-stream-checkpoint-$projectId")
.settings(additionalSettings: _*)