-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
101 lines (88 loc) · 4.29 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
90
91
92
93
94
95
96
97
98
99
100
101
Global / onChangedBuildSource := ReloadOnSourceChanges
watchBeforeCommand := Watch.clearScreen
name := "seat-stalker"
version := "0.1.0-SNAPSHOT"
scalaVersion := "3.3.1"
// ===========================================================================================
// COMPILER CONFIGURATION
// ===========================================================================================
scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-explain",
"-language:implicitConversions",
"-Ycheck-all-patmat",
"-Ycheck-reentrant",
"-Ykind-projector",
"-Ysafe-init"
) ++ Seq("-source", "future")
// ===========================================================================================
// LINTER CONFIGURATION
// ===========================================================================================
// Report all warnings as errors only on compile, not in e.g REPL or tests
ThisBuild / scalacOptions ++= Seq(
"-Wvalue-discard", // Warn when function evaluates to value that is discarded (because return type is Unit)
"-Wnonunit-statement", // Warn when non-Unit expression is in statement position
"-Wunused:all", // Warn on unused imports, params, privates, locals, etc
"-Wconf:msg=unused:warning", // Set unused warnings to warning level
"-Wconf:any:error" // Promote any other warnings to errors (i.e. treat warnings as errors, like -Xfatal-warnings)
)
// List of all warts: https://www.wartremover.org/doc/warts.html
ThisBuild / wartremoverWarnings ++= Warts.allBut(
Wart.Any,
Wart.Equals,
Wart.ImplicitConversion,
Wart.ImplicitParameter,
Wart.Nothing,
Wart.Overloading,
Wart.Recursion,
Wart.FinalCaseClass,
Wart.ToString
)
// ===========================================================================================
// DEPENDENCY VERSIONS
// ===========================================================================================
val zioVersion = "2.0.16"
val zioConfigVersion = "3.0.7"
val zioLoggingVersion = "2.1.14"
val zioJsonVersion = "0.6.2"
val zioPreludeversion = "1.0.0-RC20"
val sttpVersion = "3.9.0"
val azFunctionVersion = "2.0.1"
// ===========================================================================================
// PROJECT CONFIGURATION
// ===========================================================================================
lazy val root = (project in file("."))
.settings(
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-json" % zioJsonVersion,
"dev.zio" %% "zio-prelude" % zioPreludeversion,
"dev.zio" %% "zio-logging" % zioLoggingVersion,
"dev.zio" %% "zio-config" % zioConfigVersion,
"dev.zio" %% "zio-config-magnolia" % zioConfigVersion,
"com.softwaremill.sttp.client3" %% "core" % sttpVersion,
"com.softwaremill.sttp.client3" %% "zio" % sttpVersion,
"com.softwaremill.sttp.client3" %% "zio-json" % sttpVersion,
"com.microsoft.azure.functions" % "azure-functions-java-library" % azFunctionVersion
),
libraryDependencies ++= Seq(
"dev.zio" %% "zio-test" % zioVersion,
"dev.zio" %% "zio-test-sbt" % zioVersion,
"dev.zio" %% "zio-test-magnolia" % zioVersion
).map(_ % "test,it"),
Defaults.itSettings
)
.configs(DeepIntegrationTest)
lazy val DeepIntegrationTest =
IntegrationTest.extend(Test) // Required for bloop https://github.com/scalacenter/bloop/issues/1162
// ===========================================================================================
// PACKAGING/DEPLOYMENT CONFIGURATION
// ===========================================================================================
assembly / assemblyOutputPath := baseDirectory.value / "azure-functions" / "seat-stalker.jar"
assembly / assemblyMergeStrategy := {
case x if x.contains("io.netty.versions.properties") => MergeStrategy.discard
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
}