-
Notifications
You must be signed in to change notification settings - Fork 71
/
build.sbt
82 lines (63 loc) · 1.86 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
import sbt.Keys._
name := "cloud-formation-template-generator"
organization := "com.bayer"
startYear := Some(2014)
// scala versions and options
scalaVersion := "2.12.13"
crossScalaVersions := Seq("2.11.12", "2.12.13")
releaseCrossBuild := true
// These options will be used for *all* versions.
def crossVersionScalaOptions(scalaVersion: String) = {
CrossVersion.partialVersion(scalaVersion) match {
case Some((2, 11)) => Seq(
"-Yclosure-elim",
"-Yinline"
)
case _ => Nil
}
}
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-Xlint",
"-Xverify",
"-encoding", "UTF-8",
"-feature",
"-language:postfixOps"
) ++ crossVersionScalaOptions(scalaVersion.value)
javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation")
// dependencies
libraryDependencies ++= Seq (
// -- testing --
"org.scalatest" %% "scalatest" % "3.0.4" % Test
// -- json --
,"io.spray" %% "spray-json" % "1.3.6"
// -- reflection --
,"org.scala-lang" % "scala-reflect" % scalaVersion.value
).map(_.force())
resolvers ++= Seq(
"spray repo" at "https://repo.spray.io",
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots")
)
// for sonatype
import ReleaseTransformations._
releaseCrossBuild := true // true if you cross-build the project for multiple Scala versions
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
// For non cross-build projects, use releaseStepCommand("publishSigned")
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)
// for ghpages
enablePlugins(GhpagesPlugin, SiteScaladocPlugin)
git.remoteRepo := "[email protected]:bayer-group/cloudformation-template-generator.git"