forked from zalando-stups/play-zhewbacca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
112 lines (96 loc) · 3.78 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
109
110
111
112
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
import sbt.Keys._
import scalariform.formatter.preferences._
val commonSettings = Seq(
organization := "org.zalando",
version := "0.3.3",
scalaVersion := "2.12.5",
crossScalaVersions := Seq("2.11.12", "2.12.5"),
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8"),
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) {
Some("snapshots" at nexus + "content/repositories/snapshots")
}
else {
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
},
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
resolvers := Seq(
"scalaz-bintray" at "http://dl.bintray.com/scalaz/releases",
"scoverage-bintray" at "https://dl.bintray.com/sksamuel/sbt-plugins/"
)
)
val playFrameworkVersion = "2.6.12"
lazy val testDependencies =
Seq(
"org.specs2" %% "specs2-core" % "4.0.3" % "test",
"org.specs2" %% "specs2-junit" % "4.0.3" % "test"
)
lazy val playDependencies =
Seq(
"com.typesafe.play" %% "play-ahc-ws" % playFrameworkVersion,
"com.typesafe.play" %% "play-json" % "2.6.9",
"com.typesafe.play" %% "play-ws" % playFrameworkVersion,
"com.typesafe.play" %% "play" % playFrameworkVersion,
"com.typesafe.play" %% "play-test" % playFrameworkVersion % "test",
"com.typesafe.play" %% "play-specs2" % playFrameworkVersion % "test"
)
lazy val libraries =
Seq(
"io.paradoxical" %% "atmos" % "2.2"
)
lazy val root = (project in file("."))
.settings(commonSettings: _*)
.settings(name := "play-zhewbacca")
.settings(libraryDependencies ++= (testDependencies ++ playDependencies ++ libraries))
.settings(parallelExecution in Test := false)
// Define a special task which does not fail when any publish task fails for any module,
// so repeated publishing will be performed no matter the previous publish result.
// this checks violations to the paypal style guide
// copied from https://raw.githubusercontent.com/paypal/scala-style-guide/develop/scalastyle-config.xml
scalastyleConfig := file("scalastyle-config.xml")
scalastyleFailOnError := true
// Create a default Scala style task to run with tests
lazy val compileScalastyle = taskKey[Unit]("compileScalastyle")
compileScalastyle := scalastyle.in(Compile).toTask("").value
(compileInputs in(Compile, compile)) := ((compileInputs in(Compile, compile)) dependsOn compileScalastyle).value
scalariformSettings(autoformat = true)
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(DoubleIndentConstructorArguments, true)
.setPreference(PlaceScaladocAsterisksBeneathSecondAsterisk, true)
.setPreference(PreserveSpaceBeforeArguments, false)
.setPreference(AlignSingleLineCaseStatements, false)
.setPreference(IndentLocalDefs, true)
.setPreference(IndentPackageBlocks, true)
.setPreference(IndentWithTabs, false)
.setPreference(IndentSpaces, 2)
.setPreference(MultilineScaladocCommentsStartOnFirstLine, false)
.setPreference(SpacesAroundMultiImports, false)
pomExtra := (
<url>https://github.com/zalando-stups/play-zhewbacca</url>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/zalando-stups/play-zhewbacca/master/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:zalando-stups/play-zhewbacca.git</url>
<connection>scm:git:[email protected]:zalando-stups/play-zhewbacca.git</connection>
</scm>
<developers>
<developer>
<name>Dmitry Krivaltsevich</name>
</developer>
<developer>
<name>William Okuyama</name>
</developer>
<developer>
<name>Raymond Chenon</name>
</developer>
</developers>)