-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
73 lines (62 loc) · 3.17 KB
/
build.sbt
File metadata and controls
73 lines (62 loc) · 3.17 KB
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
import sbtassembly.AssemblyPlugin.defaultShellScript
name := "temple"
version := "1.1.2"
scalaVersion := "2.13.1"
mainClass in assembly := Some("temple.Main")
assemblyJarName in assembly := "temple-latest"
test in assembly := {}
assemblyOption in assembly := (assemblyOption in assembly).value.copy(prependShellScript = Some(defaultShellScript))
// https://www.scala-sbt.org/1.x/docs/Testing.html#Integration+Tests
lazy val EndToEndTest = config("e2e") extend Test
lazy val endToEndTestSettings: Seq[Def.Setting[_]] =
inConfig(EndToEndTest)(Defaults.testSettings) ++
Seq(
scalaSource in EndToEndTest := baseDirectory.value / "src/e2e/scala",
resourceDirectory in EndToEndTest := baseDirectory.value / "src/e2e/resources",
parallelExecution in EndToEndTest := false,
fork in EndToEndTest := true,
)
lazy val root = (project in file("."))
.configs(IntegrationTest, EndToEndTest)
.settings(endToEndTestSettings)
.settings(
Defaults.itSettings,
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2",
"org.scalatest" %% "scalatest" % "3.0.8" % "it,test",
"org.rogach" %% "scallop" % "3.3.2",
"org.postgresql" % "postgresql" % "42.2.9",
"com.sun.activation" % "javax.activation" % "1.2.0",
"com.spotify" % "docker-client" % "8.9.1",
"io.github.swagger2markup" % "markup-document-builder" % "1.1.1",
"org.slf4j" % "slf4j-nop" % "1.7.30",
"com.whisk" %% "docker-testkit-scalatest" % "0.9.9" % "it,test",
"com.whisk" %% "docker-testkit-impl-spotify" % "0.9.9" % "it,test",
"com.beachape" %% "enumeratum" % "1.5.15",
"io.circe" %% "circe-core" % "0.12.3",
"io.circe" %% "circe-generic" % "0.12.3",
"io.circe" %% "circe-parser" % "0.12.3",
"io.circe" %% "circe-yaml" % "0.12.0",
"org.scalaj" %% "scalaj-http" % "2.4.2",
),
resolvers += "JCenter" at "https://jcenter.bintray.com"
)
.enablePlugins(BuildInfoPlugin)
.settings(
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoPackage := "temple",
buildInfoUsePackageAsPath := true,
)
scalacOptions ++= Seq("-deprecation", "-feature")
// https://github.com/scoverage/sbt-scoverage#exclude-classes-and-packages
coverageExcludedPackages := "<empty>;temple\\.Main;temple\\.Application;temple\\.test\\..*;"
// Enable formatting on integration tests
inConfig(IntegrationTest)(org.scalafmt.sbt.ScalafmtPlugin.scalafmtConfigSettings)
// https://stackoverflow.com/questions/28459333/how-to-build-an-uber-jar-fat-jar-using-sbt-within-intellij-idea
// META-INF discarding
assemblyMergeStrategy in assembly ~= { _ =>
{
case PathList("META-INF", _*) => MergeStrategy.discard
case _ => MergeStrategy.first
}
}