forked from AudaxHealthInc/alpakka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
65 lines (60 loc) · 2.46 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
import Whitesource.whitesourceGroup
lazy val modules: Seq[ProjectReference] = Seq(
csv,
)
lazy val alpakka = project
.in(file("."))
.enablePlugins(ScalaUnidocPlugin)
.disablePlugins(MimaPlugin, SitePlugin)
.aggregate(modules: _*)
.settings(
onLoadMessage :=
"""
|** Welcome to the sbt build definition for Alpakka! **
|
|Useful sbt tasks:
|
| docs/previewSite - builds Paradox and Scaladoc documentation,
| starts a webserver and opens a new browser window
|
| test - runs all the tests for all of the connectors.
| Make sure to run `docker-compose up` first.
|
| mqtt/testOnly *.MqttSourceSpec - runs a single test
|
| mimaReportBinaryIssues - checks whether this current API
| is binary compatible with the released version
""".stripMargin,
// unidoc combines sources and jars from all connectors and that
// might include some incompatible ones. Depending on the
// classpath order that might lead to scaladoc compilation errors.
// Therefore some versions are exlcuded here.
ScalaUnidoc / unidoc / fullClasspath := {
(ScalaUnidoc / unidoc / fullClasspath).value
.filterNot(_.data.getAbsolutePath.contains("protobuf-java-2.5.0.jar"))
.filterNot(_.data.getAbsolutePath.contains("guava-27.1-android.jar"))
},
crossScalaVersions := List() // workaround for https://github.com/sbt/sbt/issues/3465
)
lazy val csv = alpakkaProject("csv", "csv", Dependencies.Csv, whitesourceGroup := Whitesource.Group.Supported)
def alpakkaProject(projectId: String, moduleName: String, additionalSettings: sbt.Def.SettingsDefinition*): Project =
Project(id = projectId, base = file(projectId))
.enablePlugins(AutomateHeaderPlugin)
.disablePlugins(SitePlugin)
.settings(
name := s"akka-stream-alpakka-$projectId",
AutomaticModuleName.settings(s"akka.stream.alpakka.$moduleName"),
mimaPreviousArtifacts := Set(
organization.value %% name.value % previousStableVersion.value
.getOrElse(throw new Error("Unable to determine previous version"))
)
)
.settings(additionalSettings: _*)
Global / onLoad := (Global / onLoad).value.andThen { s =>
val v = version.value
if (dynverGitDescribeOutput.value.hasNoTags)
throw new MessageOnlyException(
s"Failed to derive version from git tags. Maybe run `git fetch --unshallow`? Derived version: $v"
)
s
}