-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
78 lines (69 loc) · 2.18 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
import Dependencies._
import ReleaseTransformations._
addCommandAlias("fix", "all compile:scalafix test:scalafix")
addCommandAlias("fixCheck", "; scalafmtCheckAll ; compile:scalafix --check ; test:scalafix --check")
lazy val compileSettings = Seq(
Compile / compile := (Compile / compile)
.dependsOn(
Compile / scalafmtSbt,
Compile / scalafmtAll
)
.value,
addCompilerPlugin(scalafixSemanticdb),
(ThisBuild / scalafixDependencies) += "org.scalatest" %% "autofix" % Versions.ScalaTestAutofix,
(ThisBuild / scalafixDependencies) += "com.nequissimus" %% "sort-imports" % Versions.ScalafixSortImports,
scalacOptions ++= Seq(
"-deprecation",
"-encoding",
"utf8",
"-Xlint:missing-interpolator",
"-Xlint:private-shadow",
"-Xlint:type-parameter-shadow",
"-Ywarn-dead-code",
"-Ywarn-unused"
),
scalacOptions -= "-Xfatal-warnings",
scalaVersion := Versions.Scala
)
lazy val dependenciesSettings = Seq(
excludeDependencies ++= excludeDeps,
libraryDependencies ++= prodDeps ++ testDeps,
resolvers ++= CustomResolvers.resolvers
)
lazy val publishSettings = Seq(
Test / publishArtifact := false,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepTask((Docker / publishLocal)),
setNextVersion,
commitNextVersion,
pushChanges
)
)
lazy val testSettings = Seq(
Test / logBuffered := false,
Test / parallelExecution := false
)
lazy val root = (project in file("."))
.settings(
name := "kafka-dvs-streams",
organization := "it.bitrock.dvs"
)
.settings(compileSettings: _*)
.settings(dependenciesSettings: _*)
.settings(publishSettings: _*)
.settings(testSettings: _*)
/** sbt-native-packager plugin
*/
enablePlugins(JavaAppPackaging, DockerPlugin) // Add AshScriptPlugin if base image is Alpine, i.e. misses bash
dockerBaseImage := "openjdk:8-jre-slim"
dockerRepository := Option(sys.env.getOrElse("DOCKER_REPOSITORY", "local"))
(Docker / maintainer) := "Bitrock DVS team dvs@bitrock.it"
// Remove the top level directory for universal package
topLevelDirectory := None