-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
89 lines (78 loc) · 2.38 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
import Dependencies._
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
addCommandAlias("fix", "all compile:scalafix test:scalafix")
addCommandAlias("fixCheck", "; compile:scalafix --check ; test:scalafix --check")
lazy val commonSettings = Seq(
organization := "it.bitrock.dvs",
scalaVersion := Versions.Scala
)
lazy val compileSettings = Seq(
Compile / compile := (Compile / compile)
.dependsOn(
Compile / scalafmtSbt,
Compile / scalafmtAll
)
.value,
addCompilerPlugin(scalafixSemanticdb),
scalafixDependencies in ThisBuild += "org.scalatest" %% "autofix" % Versions.ScalaTestAutofix,
scalafixDependencies in ThisBuild += "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",
"-Ypartial-unification",
"-Yrangepos"
),
scalacOptions -= "-Xfatal-warnings"
)
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(publishLocal in Docker),
setNextVersion,
commitNextVersion,
pushChanges
)
)
lazy val testSettings = Seq(
Test / logBuffered := false,
Test / parallelExecution := false
)
lazy val root = (project in file("."))
.settings(
name := "kafka-dvs-api"
)
.settings(commonSettings: _*)
.settings(compileSettings: _*)
.settings(dependenciesSettings: _*)
.settings(publishSettings: _*)
.settings(testSettings: _*)
.configs(IntegrationTest)
/** sbt-native-packager plugin
*/
enablePlugins(JavaAppPackaging, DockerPlugin, AshScriptPlugin)
dockerBaseImage := "openjdk:8-jre-alpine"
dockerRepository := Option(sys.env.getOrElse("DOCKER_REPOSITORY", "local"))
maintainer in Docker := "Bitrock DVS team [email protected]"
// Fix for sbt-native-packager 1.3.19
daemonUserUid in Docker := None
daemonUser in Docker := "root"
// Remove the top level directory for universal package
topLevelDirectory := None