forked from jacum/akka-sensors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
82 lines (75 loc) · 2.6 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
import Dependencies._
import Keys._
import sbt.file
lazy val scala2 = "2.13.14"
ThisBuild / versionScheme := Some("early-semver")
val commonSettings = Defaults.coreDefaultSettings ++ Seq(
organization := "nl.pragmasoft.sensors",
scalaVersion := scala2,
testOptions += Tests.Argument(TestFrameworks.JUnit, "-v"),
Test / parallelExecution := false,
Test / fork := true,
scalacOptions := Seq(
s"-unchecked",
"-deprecation",
"-feature",
"-language:higherKinds",
"-language:existentials",
"-language:implicitConversions",
"-language:postfixOps",
"-encoding",
"utf8",
"-Xfatal-warnings"
),
Compile / packageBin / packageOptions
+=
Package.ManifestAttributes(
"Build-Time" -> new java.util.Date().toString,
"Build-Commit" -> git.gitHeadCommit.value.getOrElse("No Git Revision Found")
),
doc / sources := Seq.empty,
packageSrc / publishArtifact := false,
packageDoc / publishArtifact := true
) ++ Publish.settings
lazy val noPublishSettings = Seq(
publish / skip := true,
publish := {},
publishLocal := {},
publishArtifact := false
)
lazy val `sensors-core` = project
.in(file("sensors-core"))
.settings(commonSettings)
.settings(
moduleName := "sensors-core",
libraryDependencies ++= Akka.deps ++ Prometheus.deps ++ Logging.deps ++ TestTools.deps,
dependencyOverrides ++= Akka.deps
)
lazy val `sensors-cassandra` = project
.in(file("sensors-cassandra"))
.settings(commonSettings)
.settings(
moduleName := "sensors-cassandra",
libraryDependencies ++= Akka.deps ++ Prometheus.deps ++
(Cassandra.deps :+ Cassandra.cassandraUnit % Test) ++ Logging.deps ++ TestTools.deps,
dependencyOverrides ++= Akka.deps
)
.dependsOn(`sensors-core`)
lazy val `app` = project
.in(file("examples/app"))
.enablePlugins(JavaAppPackaging, DockerPlugin)
.settings(commonSettings ++ noPublishSettings)
.settings(
moduleName := "app",
Compile / mainClass := Some("nl.pragmasoft.app.Main"),
Docker / version := Keys.version.value,
dockerUpdateLatest := true,
libraryDependencies ++= App.deps :+ Cassandra.cassandraUnit,
dependencyOverrides ++= Akka.deps
)
.dependsOn(`sensors-core`, `sensors-cassandra`)
lazy val `root` = project
.in(file("."))
.aggregate(app, `sensors-core`, `sensors-cassandra`)
.settings(commonSettings ++ noPublishSettings)
.settings(name := "Akka Sensors")