forked from ReactiveMongo/ReactiveMongo-Play-Json
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
102 lines (80 loc) · 3.13 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
organization := "org.reactivemongo"
name := "reactivemongo-play-json"
val buildVersion = "0.12.0-SNAPSHOT"
version := buildVersion
scalaVersion := "2.11.7"
scalacOptions ++= Seq("-unchecked", "-deprecation", "-target:jvm-1.8")
scalacOptions in (Compile, doc) := Seq("-Ywarn-unused-import", "-unchecked", "-deprecation")
crossScalaVersions := Seq("2.11.7")
crossVersion := CrossVersion.binary
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
"Typesafe repository releases" at "http://repo.typesafe.com/typesafe/releases/")
libraryDependencies ++= Seq(
"org.reactivemongo" %% "reactivemongo" % buildVersion % "provided" cross CrossVersion.binary,
"com.typesafe.play" %% "play-json" % "2.4.5" % "provided" cross CrossVersion.binary)
// Test
testOptions in Test += Tests.Cleanup(cl => {
import scala.language.reflectiveCalls
val c = cl.loadClass("Common$")
type M = { def closeDriver(): Unit }
val m: M = c.getField("MODULE$").get(null).asInstanceOf[M]
m.closeDriver()
})
libraryDependencies ++= (Seq(
"specs2-core"
).map("org.specs2" %% _ % "2.4.9") ++ Seq(
"org.slf4j" % "slf4j-simple" % "1.7.13")).
map(_ % Test)
// Publish
lazy val publishSettings = {
@inline def env(n: String): String = sys.env.get(n).getOrElse(n)
val repoName = env("PUBLISH_REPO_NAME")
val repoUrl = env("PUBLISH_REPO_URL")
Seq(
publishMavenStyle := true,
publishArtifact in Test := false,
publishTo := Some(repoUrl).map(repoName at _),
credentials += Credentials(repoName, env("PUBLISH_REPO_ID"),
env("PUBLISH_USER"), env("PUBLISH_PASS")),
pomIncludeRepository := { _ => false },
licenses := {
Seq("Apache 2.0" ->
url("http://www.apache.org/licenses/LICENSE-2.0"))
},
homepage := Some(url("http://reactivemongo.org")),
pomExtra := (
<scm>
<url>git://github.com/ReactiveMongo/ReactiveMongo-Play-Json.git</url>
<connection>scm:git://github.com/ReactiveMongo/ReactiveMongo-Play-Json.git</connection>
</scm>
<developers>
<developer>
<id>sgodbillon</id>
<name>Stephane Godbillon</name>
<url>http://stephane.godbillon.com</url>
</developer>
</developers>))
}
// Scalariform
import scalariform.formatter.preferences._
scalariformSettings
ScalariformKeys.preferences := ScalariformKeys.preferences.value.
setPreference(AlignParameters, false).
setPreference(AlignSingleLineCaseStatements, true).
setPreference(CompactControlReadability, false).
setPreference(CompactStringConcatenation, false).
setPreference(DoubleIndentClassDeclaration, true).
setPreference(FormatXml, true).
setPreference(IndentLocalDefs, false).
setPreference(IndentPackageBlocks, true).
setPreference(IndentSpaces, 2).
setPreference(MultilineScaladocCommentsStartOnFirstLine, false).
setPreference(PreserveSpaceBeforeArguments, false).
setPreference(PreserveDanglingCloseParenthesis, true).
setPreference(RewriteArrowSymbols, false).
setPreference(SpaceBeforeColon, false).
setPreference(SpaceInsideBrackets, false).
setPreference(SpacesWithinPatternBinders, true)
lazy val root = (project in file(".")).
settings(publishSettings: _*)