forked from mdedetrich/stripe-scala
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
108 lines (87 loc) · 3.42 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
102
103
104
105
106
107
108
import ReleaseTransformations._
name := "stripe-scala"
val currentScalaVersion = "2.12.3"
val scala211Version = "2.11.11"
val circeVersion = "0.8.0"
scalaVersion := currentScalaVersion
crossScalaVersions := Seq(currentScalaVersion, scala211Version)
organization := "org.mdedetrich"
scalacOptions ++= Seq(
"-target:jvm-1.8",
"-encoding",
"UTF-8",
"-deprecation", // warning and location for usages of deprecated APIs
"-feature", // warning and location for usages of features that should be imported explicitly
"-unchecked", // additional warnings where generated code depends on assumptions
"-Xlint", // recommended additional warnings
"-Xcheckinit", // runtime error when a val is not initialized due to trait hierarchies (instead of NPE somewhere else)
"-Ywarn-adapted-args", // Warn if an argument list is modified to match the receiver
"-Ywarn-value-discard", // Warn when non-Unit expression results are unused
"-Ywarn-inaccessible",
"-Ywarn-dead-code",
"-language:postfixOps"
)
Defaults.itSettings
configs(IntegrationTest)
val enumeratumVersion = "1.5.12"
val enumeratumCirceVersion = "1.5.14"
val akkaStreamJson = "3.4.0"
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-http" % "10.0.9",
"de.knutwalker" %% "akka-stream-circe" % akkaStreamJson,
"de.knutwalker" %% "akka-http-circe" % akkaStreamJson,
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"com.beachape" %% "enumeratum" % enumeratumVersion,
"com.beachape" %% "enumeratum-circe" % enumeratumCirceVersion,
"com.iheart" %% "ficus" % "1.4.1",
"com.typesafe.scala-logging" %% "scala-logging" % "3.7.2",
"org.scalatest" %% "scalatest" % "3.0.3" % "test, it",
"ch.qos.logback" % "logback-classic" % "1.2.3" % "test, it"
)
homepage := Some(url("https://github.com/mdedetrich/stripe-scala"))
scmInfo := Some(
ScmInfo(url("https://github.com/mdedetrich/stripe-scala"), "[email protected]:mdedetrich/stripe-scala.git"))
developers := List(
Developer("mdedetrich", "Matthew de Detrich", "[email protected]", url("https://github.com/mdedetrich")),
Developer("leonardehrenfried", "Leonard Ehrenfried", "[email protected]", url("https://leonard.io"))
)
licenses += ("BSD 3 Clause", url("https://opensource.org/licenses/BSD-3-Clause"))
pomIncludeRepository := (_ => false)
releaseCrossBuild := true
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
ReleaseStep(action = Command.process("publishSigned", _), enableCrossBuild = true),
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _), enableCrossBuild = true),
pushChanges
)
val flagsFor11 = Seq(
"-Xlint:_",
"-Yconst-opt",
"-Ywarn-infer-any",
"-Yclosure-elim",
"-Ydead-code"
)
val flagsFor12 = Seq(
"-Xlint:_",
"-Ywarn-infer-any",
"-opt:l:project"
)
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n >= 12 =>
flagsFor12
case Some((2, n)) if n == 11 =>
flagsFor11
}
}
parallelExecution in IntegrationTest := false