This repository has been archived by the owner on Aug 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
/
build.sbt
109 lines (86 loc) · 2.44 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
/* basic project info */
name := "ficus"
organization := "net.ceedubs"
description := "A Scala-friendly wrapper companion for Typesafe config"
homepage := Some(url("https://github.com/ceedubs/ficus"))
startYear := Some(2013)
licenses := Seq(
"MIT License" -> url("http://www.opensource.org/licenses/mit-license.html")
)
scmInfo := Some(
ScmInfo(
url("https://github.com/ceedubs/ficus"),
"scm:git:https://github.com/ceedubs/ficus.git",
Some("scm:git:[email protected]:ceedubs/ficus.git")
)
)
/* scala versions and options */
scalaVersion := "2.11.0"
// These options will be used for *all* versions.
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-encoding", "UTF-8"
)
scalacOptions ++= Seq(
"-Yclosure-elim",
"-Yinline"
)
// These language flags will be used only for 2.10.x.
// Uncomment those you need, or if you hate SIP-18, all of them.
scalacOptions <++= scalaVersion map { sv =>
if (sv startsWith "2.10") List(
"-Xverify",
"-Ywarn-all",
"-feature",
"-language:postfixOps",
"-language:implicitConversions",
"-language:higherKinds"
)
else Nil
}
javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation")
/* dependencies */
libraryDependencies <++= scalaVersion { sv =>
Seq(
"org.specs2" %% "specs2" % "2.3.11" % "test",
"org.scalacheck" %% "scalacheck" % "1.11.3" % "test",
"com.chuusai" %% "shapeless" % "2.0.0" % "test",
"com.typesafe" % "config" % "1.2.1",
"org.scala-lang" % "scala-reflect" % sv % "provided")
}
/* you may need these repos */
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots")
)
/* testing */
parallelExecution in Test := true
/* sbt behavior */
logLevel in compile := Level.Warn
traceLevel := 5
offline := false
/* publishing */
publishMavenStyle := true
publishTo <<= version { (v: String) =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT")) Some(
"snapshots" at nexus + "content/repositories/snapshots"
)
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
mappings in (Compile, packageBin) ~= { (ms: Seq[(File, String)]) =>
ms filter { case (file, toPath) =>
toPath != "application.conf"
}
}
publishArtifact in Test := false
pomIncludeRepository := { _ => false }
pomExtra := (
<developers>
<developer>
<id>ceedubs</id>
<name>Cody Allen</name>
<email>[email protected]</email>
</developer>
</developers>
)