-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sbt
executable file
·93 lines (81 loc) · 3.31 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
import sbtrelease.ReleaseStateTransformations._
name := "workshop-scala-msi"
organization in ThisBuild := "org.scalamsi"
scalaVersion in ThisBuild := "2.12.8"
lazy val root = (project in file("."))
.settings(
libraryDependencies ++= Seq(
//workshop dependencies
cats,
doobieCore,
doobiePostgres,
doobieScalatest,
http4sBlaze,
http4sCirce,
http4sDsl,
http4sClient,
circeGeneric,
circeJava8,
scalaLogging,
logbackClassic,
pureConfig,
refinedPureconfig,
macwire,
macwireUtil,
scalaTest,
testContainers,
testContainersPostgres,
),
mainClass in Compile := Some("org.scalamsi.Main"),
Test / fork := true,
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.6")
)
.enablePlugins(JavaAppPackaging)
// https://tpolecat.github.io/2017/04/25/scalac-flags.html
// https://docs.scala-lang.org/overviews/compiler-options/index.html
scalacOptions ++= Seq(
"-explaintypes", // Explain type errors in more detail.
"-deprecation",
"-encoding",
"UTF-8",
"-language:higherKinds",
"-language:postfixOps",
"-feature",
"-Ypartial-unification",
"-target:jvm-1.8",
"-unchecked",
"-Xfuture",
// "-Ywarn-dead-code",
"-Ywarn-value-discard",
// "-Ywarn-unused",
"-Xlint:by-name-right-associative", // By-name parameter of right associative operator.
"-Xlint:constant", // Evaluation of a constant arithmetic expression results in an error.
"-Xlint:delayedinit-select", // Selecting member of DelayedInit.
"-Xlint:doc-detached", // A Scaladoc comment appears to be detached from its element.
"-Xlint:inaccessible", // Warn about inaccessible types in method signatures.
"-Xlint:infer-any", // Warn when a type argument is inferred to be `Any`.
"-Xlint:missing-interpolator", // A string literal appears to be missing an interpolator id.
"-Xlint:nullary-override", // Warn when non-nullary `def f()' overrides nullary `def f'.
"-Xlint:nullary-unit", // Warn when nullary methods return Unit.
"-Xlint:option-implicit", // Option.apply used implicit view.
"-Xlint:package-object-classes", // Class or object defined in package object.
"-Xlint:poly-implicit-overload", // Parameterized overloaded implicit methods are not visible as view bounds.
"-Xlint:private-shadow", // A private field (or class parameter) shadows a superclass field.
"-Xlint:stars-align", // Pattern sequence wildcard must align with sequence component.
"-Xlint:type-parameter-shadow", // A local type parameter shadows a type already in scope.
"-Xlint:unsound-match", // Pattern match may not be typesafe.
)
scalacOptions in (Compile, console) --= Seq("-Ywarn-unused:imports", "-Xfatal-warnings")
releaseProcess := Seq.empty[ReleaseStep]
releaseProcess ++= (if (sys.env.contains("RELEASE_VERSION_BUMP"))
Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
setReleaseVersion,
commitReleaseVersion,
tagRelease
)
else Seq.empty[ReleaseStep])
releaseProcess ++= (if (sys.env.contains("RELEASE_PUBLISH"))
Seq[ReleaseStep](inquireVersions, setNextVersion, commitNextVersion)
else Seq.empty[ReleaseStep])