forked from Bayer-Group/cloudformation-template-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
81 lines (61 loc) · 2.01 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
import sbt.Keys._
name := "cloud-formation-template-generator"
organization := "com.monsanto.arch"
startYear := Some(2014)
// scala versions and options
scalaVersion := "2.12.4"
crossScalaVersions := Seq("2.11.11", "2.12.4")
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.4"
// -- reflection --
,"org.scala-lang" % "scala-reflect" % scalaVersion.value
).map(_.force())
resolvers ++= Seq(
"spray repo" at "http://repo.spray.io",
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots")
)
// for ghpages
enablePlugins(GhpagesPlugin, SiteScaladocPlugin)
git.remoteRepo := "git@github.com:MonsantoCo/cloudformation-template-generator.git"
// for bintray
bintrayOrganization := Some("monsanto")
licenses += ("BSD", url("http://opensource.org/licenses/BSD-3-Clause"))
bintrayReleaseOnPublish := ! isSnapshot.value
publishTo in ThisBuild := Def.taskDyn[Option[Resolver]] {
if (isSnapshot.value)
Def.task(Some("Artifactory Realm" at "https://oss.jfrog.org/oss-snapshot-local/"))
else
Def.task(publishTo.value) /* Value set by bintray-sbt plugin */
}.value
credentials := Def.taskDyn[Seq[Credentials]] {
if (isSnapshot.value)
Def.task(List(Path.userHome / ".bintray" / ".artifactory").filter(_.exists).map(Credentials(_)))
else
Def.task(credentials.value) /* Value set by bintray-sbt plugin */
}.value