-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
65 lines (61 loc) · 2.67 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 com.typesafe.sbt.SbtNativePackager.autoImport.NativePackagerHelper._
import com.typesafe.sbt.packager.docker.{
DockerChmodType,
DockerPermissionStrategy
}
ThisBuild / scalaVersion := "2.13.16"
ThisBuild / organization := "com.gaston"
ThisBuild / organizationName := "gaston-schabas"
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
licenses += (
"GPL-3.0",
url("https://github.com/gastonschabas/rumble-on-scala/blob/master/LICENSE")
)
lazy val testContainerVersion = "0.41.8"
lazy val playPort = 9000
lazy val root = (project in file("."))
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
name := "rumble-on-scala",
resolvers += Resolver.jcenterRepo,
libraryDependencies ++= Seq(
"org.scalatestplus.play" %% "scalatestplus-play" % "7.0.1" % "it, test",
"org.playframework" %% "play-slick" % "6.1.1",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.18.2",
"com.dimafeng" %% "testcontainers-scala-scalatest" % testContainerVersion % "it",
"com.dimafeng" %% "testcontainers-scala-postgresql" % testContainerVersion % "it",
"org.postgresql" % "postgresql" % "42.7.5",
"com.danielasfregola" %% "random-data-generator" % "2.9" % "it, test",
"io.github.nafg.slick-migration-api" %% "slick-migration-api-flyway" % "0.11.0",
"org.scalamock" %% "scalamock" % "6.2.0" % Test,
guice
),
coverageExcludedPackages := ".*Reverse.*;.*Routes.*",
Compile / compile / wartremoverErrors ++= Warts.unsafe,
wartremoverExcluded += baseDirectory.value / "target",
publishTo := Some(Resolver.file("file", new File("/tmp"))),
publishArtifact := false,
majorRegexes := Seq("\\[?breaking\\]?.*".r, "\\[?major\\]?.*".r),
minorRegexes := Seq("\\[?minor\\]?.*".r),
bugfixRegexes := Seq("\\[?bugfix\\]?.*".r, "\\[?fix\\]?.*".r, ".*".r),
Universal / mappings ++= directory(
baseDirectory.value / "src" / "main" / "resources"
),
Docker / packageName := packageName.value,
Docker / version := version.value,
dockerRepository := Some("gastonschabas"),
dockerBaseImage := "amazoncorretto:17-alpine-jdk",
dockerExposedPorts := Seq(playPort),
dockerLabels := Map(
"maintainer" -> "[email protected]",
"app" -> name.value,
"version" -> version.value
),
dockerChmodType := DockerChmodType.UserGroupWriteExecute,
dockerPermissionStrategy := DockerPermissionStrategy.CopyChown
)
.enablePlugins(PlayScala)
.enablePlugins(DockerPlugin)
.enablePlugins(JavaAppPackaging)
.disablePlugins(PlayLayoutPlugin)