This repository has been archived by the owner on Nov 28, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
147 lines (98 loc) · 4.93 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
import scala.xml.Group
lazy val core = project
lazy val json = project in file("codecs/json") dependsOn (core % "compile->compile;test->test")
lazy val jackson = project in file("codecs/jackson") dependsOn (core % "compile->compile;test->test", json % "compile->compile;test->test")
lazy val jawn = project in file("codecs/jawn") dependsOn (core % "compile->compile;test->test", json % "compile->compile;test->test")
lazy val json4s = project in file("codecs/json4s") dependsOn (core % "compile->compile;test->test", json % "compile->compile;test->test")
lazy val strings = project in file("codecs/strings") dependsOn (core % "compile->compile;test->test")
lazy val playJson = project in file("codecs/play-json") dependsOn (core % "compile->compile;test->test", json % "compile->compile;test->test")
lazy val argonaut = project in file("codecs/argonaut") dependsOn (core % "compile->compile;test->test", json % "compile->compile;test->test")
lazy val caliperBenchmarks = project in file("benchmarks/caliper") dependsOn (core % "compile->compile;test->test", jackson % "compile->compile;test->test", json4s % "compile->compile;test->test", playJson % "compile->compile;test->test", argonaut % "compile->compile;test->test", jawn % "compile->compile;test->test", strings % "compile->compile;test->test")
scalaVersion in ThisBuild := "2.11.1"
crossScalaVersions in ThisBuild := Seq("2.10.4", "2.11.1")
name := "muster"
organization in ThisBuild := "org.json4s"
organization := "org.json4s"
scalacOptions in ThisBuild ++= Seq("-target:jvm-1.7", "-unchecked", "-deprecation", "-optimize", "-feature", "-Yinline-warnings")
javacOptions in ThisBuild ++= Seq("-deprecation", "-Xlint")
libraryDependencies in ThisBuild ++= Seq(
Dependencies.Specs2 % "test",
Dependencies.ScalaCheck % "test",
Dependencies.ScalaMeter % "test"
)
testOptions in ThisBuild += Tests.Argument(TestFrameworks.Specs2, "console", "junitxml")
testFrameworks in ThisBuild += new TestFramework("org.scalameter.ScalaMeterFramework")
parallelExecution in (ThisBuild, test) := false
logBuffered in ThisBuild := false
packageOptions in ThisBuild <+= (name, version, organization) map {
(title, version, vendor) =>
Package.ManifestAttributes(
"Created-By" -> "Simple Build Tool",
"Built-By" -> System.getProperty("user.name"),
"Build-Jdk" -> System.getProperty("java.version"),
"Specification-Title" -> title,
"Specification-Version" -> version,
"Specification-Vendor" -> vendor,
"Implementation-Title" -> title,
"Implementation-Version" -> version,
"Implementation-Vendor-Id" -> vendor,
"Implementation-Vendor" -> vendor
)
}
credentials in ThisBuild ++= ((sys.env.get("SONATYPE_USER"), sys.env.get("SONATYPE_PASS")) match {
case (Some(user), Some(pass)) =>
Seq(Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", user, pass))
case _ =>
Seq.empty[Credentials]
})
publishTo in ThisBuild <<= version { version: String =>
if (version.trim.endsWith("SNAPSHOT"))
Some(Opts.resolver.sonatypeSnapshots)
else
Some(Opts.resolver.sonatypeStaging)
}
publishMavenStyle in ThisBuild := true
homepage in ThisBuild := Some(new URL("https://github.com/json4s/muster"))
startYear in ThisBuild := Some(2013)
licenses in ThisBuild := Seq(("MIT", new URL("https://github.com/json4s/muster/raw/HEAD/LICENSE")))
scmInfo in ThisBuild := Some(ScmInfo(url("http://github.com/json4s/muster"), "scm:git:git://github.com/json4s/muster.git", Some("scm:git:[email protected]:json4s/muster.git")))
pomExtra in ThisBuild <<= (pomExtra, name, description) { (pom, name, desc) =>
pom ++ Group(
<developers>
<developer>
<id>casualjim</id>
<name>Ivan Porto Carrero</name>
<url>http://flanders.co.nz/</url>
</developer>
</developers>
)
}
publishMavenStyle in ThisBuild := true
publishArtifact in Test in ThisBuild := false
pomIncludeRepository in ThisBuild := { x => false }
ivyLoggingLevel in (ThisBuild, update) := UpdateLogging.DownloadOnly
// root project specific settings
if (sys.env.getOrElse("TRAVIS","false").toBoolean) {
Seq(
git.remoteRepo := s"https://${sys.env("GH_TOKEN")}@github.com/json4s/muster.git",
useGpg := false,
pgpSecretRing := target.value / "secring.gpg",
pgpPublicRing := target.value / "pubring.gpg",
pgpPassphrase := sys.env.get("GPG_PASSPHRASE").map(_.toCharArray)
)
} else
Seq(
git.remoteRepo := "[email protected]:json4s/muster.git"
)
publish := {}
publishLocal := {}
PgpKeys.publishSigned := {}
packagedArtifacts := Map.empty
unidocSettings
UnidocKeys.unidocProjectFilter in (ScalaUnidoc, UnidocKeys.unidoc) := inAnyProject -- inProjects(caliperBenchmarks)
scalacOptions in (ScalaUnidoc, UnidocKeys.unidoc) += "-Ymacro-expand:none" // 2.10 => "-Ymacro-no-expand"
site.addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), "latest/api")
site.settings
ghpages.settings
site.jekyllSupport()
GhPagesKeys.repository := target.value / "ghpages"