This repository has been archived by the owner on Dec 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
106 lines (98 loc) · 2.91 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
organization in ThisBuild := "io.circe"
val compilerOptions = Seq(
"-deprecation",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-unchecked",
"-Yno-adapted-args",
"-Ypartial-unification",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-unused-import",
"-Xfuture"
)
val circeVersion = "0.12.3"
val baseSettings = Seq(
scalacOptions ++= compilerOptions,
scalacOptions in (Compile, console) ~= {
_.filterNot(Set("-Ywarn-unused-import"))
},
scalacOptions in (Test, console) ~= {
_.filterNot(Set("-Ywarn-unused-import"))
},
coverageHighlighting := true,
coverageScalacPluginVersion := "1.3.1",
(scalastyleSources in Compile) ++= (unmanagedSourceDirectories in Compile).value
)
val allSettings = baseSettings ++ publishSettings
val docMappingsApiDir = settingKey[String]("Subdirectory in site target directory for API docs")
val root = project
.in(file("."))
.settings(allSettings)
.settings(
moduleName := "circe-sangria",
libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion % Test,
"io.circe" %% "circe-testing" % circeVersion % Test,
"org.sangria-graphql" %% "sangria-marshalling-api" % "1.0.4",
"org.sangria-graphql" %% "sangria-marshalling-testkit" % "1.0.2" % Test
),
ghpagesNoJekyll := true,
docMappingsApiDir := "api",
addMappingsToSiteDir(mappings in (Compile, packageDoc), docMappingsApiDir)
)
lazy val publishSettings = Seq(
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
homepage := Some(url("https://github.com/circe/circe-sangria")),
licenses := Seq("Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ =>
false
},
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"))
},
autoAPIMappings := true,
apiURL := Some(url("https://circe.github.io/circe-sangria/api/")),
scmInfo := Some(
ScmInfo(
url("https://github.com/circe/circe-sangria"),
"scm:git:git@github.com:circe/circe-sangria.git"
)
),
developers := List(
Developer(
"OlegIlyenko",
"Oleg Ilyenko",
"",
url("https://github.com/OlegIlyenko")
),
Developer(
"travisbrown",
"Travis Brown",
"travisrobertbrown@gmail.com",
url("https://twitter.com/travisbrown")
)
)
)
credentials ++= (
for {
username <- Option(System.getenv().get("SONATYPE_USERNAME"))
password <- Option(System.getenv().get("SONATYPE_PASSWORD"))
} yield Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
username,
password
)
).toSeq