-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.sbt
82 lines (64 loc) · 2.43 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._
organization := "com.github.fommil"
name := "spray-json-shapeless"
scalaVersion := "2.11.7"
version := "1.0.1-SNAPSHOT"
libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.2.3",
"io.spray" %% "spray-json" % "1.3.2",
"org.slf4j" % "slf4j-api" % "1.7.5",
"org.scalatest" %% "scalatest" % "2.2.5" % "test",
"com.typesafe.akka" %% "akka-slf4j" % "2.3.11" % "test"
) ++ {
if (scalaVersion.value.startsWith("2.10.")) Seq(
compilerPlugin("org.scalamacros" % "paradise" % "2.0.1" cross CrossVersion.full)
) else Nil
}
dependencyOverrides ++= Set(
"org.scala-lang" % "scala-reflect" % scalaVersion.value
) ++ {
if (scalaVersion.value.startsWith("2.11")) Set(
"org.scala-lang.modules" %% "scala-xml" % "1.0.4"
) else Nil
}
scalacOptions in Compile ++= Seq(
"-encoding", "UTF-8", "-target:jvm-1.6", "-feature", "-deprecation",
"-Xfatal-warnings",
"-language:postfixOps", "-language:implicitConversions"
)
javacOptions in (Compile, compile) ++= Seq(
"-source", "1.6", "-target", "1.6", "-Xlint:all", "-Werror",
"-Xlint:-options", "-Xlint:-path", "-Xlint:-processing"
)
javacOptions in doc ++= Seq("-source", "1.6")
javaOptions ++= Seq("-XX:MaxPermSize=256m", "-Xmx2g", "-XX:+UseConcMarkSweepGC")
javaOptions in Test += "-Dlogback.configurationFile=../logback-test.xml"
// WORKAROUND: https://github.com/scalatest/scalatest/issues/511
def noColorIfEmacs = if (sys.env.get("TERM") == Some("dumb"))
Seq(Tests.Argument("-oWF"))
else
Seq(Tests.Argument("-oF"))
testOptions in Test ++= noColorIfEmacs
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html"))
homepage := Some(url("http://github.com/fommil/spray-json-shapeless"))
publishTo <<= version { v: String =>
val nexus = "https://oss.sonatype.org/"
if (v.contains("SNAP")) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
credentials += Credentials(
"Sonatype Nexus Repository Manager", "oss.sonatype.org",
sys.env.getOrElse("SONATYPE_USERNAME", ""),
sys.env.getOrElse("SONATYPE_PASSWORD", "")
)
pomExtra :=
<scm>
<url>[email protected]:fommil/spray-json-shapeless.git</url>
<connection>scm:git:[email protected]:fommil/spray-json-shapeless.git</connection>
</scm>
<developers>
<developer>
<id>fommil</id>
<name>Sam Halliday</name>
</developer>
</developers>