-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
43 lines (39 loc) · 1.51 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
organization := "io.scalac"
scalaVersion := "2.13.10"
Global / onChangedBuildSource := ReloadOnSourceChanges
enablePlugins(KalixPlugin, JavaAppPackaging, DockerPlugin)
dockerBaseImage := "docker.io/library/adoptopenjdk:11-jre-hotspot"
dockerUsername := sys.env.get("DOCKER_KALIX_USERNAME")
dockerRepository := sys.env.get("DOCKER_KALIX_REPOSITORY")
dockerUpdateLatest := true
dockerBuildCommand := {
val arch = sys.props("os.arch")
if (arch != "amd64" && !arch.contains("x86")) {
// use buildx with platform to build supported amd64 images on other CPU architectures
// this may require that you have first run 'docker buildx create' to set docker buildx up
dockerExecCommand.value ++ Seq("buildx", "build", "--platform=linux/amd64", "--load") ++ dockerBuildOptions.value :+ "."
} else dockerBuildCommand.value
}
ThisBuild / dynverSeparator := "-"
run / fork := true
run / envVars += ("HOST", "0.0.0.0")
run / javaOptions ++= Seq("-Dlogback.configurationFile=logback-dev-mode.xml")
Compile / scalacOptions ++= Seq(
"-release:11",
"-deprecation",
"-feature",
"-unchecked",
"-Xlog-reflective-calls",
"-Xlint"
)
Compile / javacOptions ++= Seq(
"-Xlint:unchecked",
"-Xlint:deprecation",
"-parameters" // for Jackson
)
libraryDependencies ++= Seq(
"com.github.pureconfig" %% "pureconfig" % "0.17.6", // config
"com.github.jwt-scala" %% "jwt-core" % "10.0.0", // needed for JWT generation
"org.scalatest" %% "scalatest" % "3.2.7" % Test,
"org.scalamock" %% "scalamock" % "5.2.0" % Test
)