forked from finagle/finagle-postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
99 lines (85 loc) · 3.23 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
lazy val buildSettings = Seq(
organization := "io.github.finagle",
version := "0.5.0",
scalaVersion := "2.12.4",
crossScalaVersions := Seq("2.11.12","2.12.4"),
fork in Test := true
)
val baseSettings = Seq(
resolvers += Resolver.bintrayRepo("jeremyrsmith", "maven"),
libraryDependencies ++= Seq(
"com.twitter" %% "finagle-core" % "17.11.0",
"com.twitter" %% "finagle-netty3" % "17.11.0",
"org.scalatest" %% "scalatest" % "3.0.4" % "test,it",
"org.scalacheck" %% "scalacheck" % "1.13.5" % "test,it",
"org.scalamock" %% "scalamock-scalatest-support" % "3.4.2" % "test,it"
)
)
lazy val publishSettings = Seq(
publishMavenStyle := true,
publishArtifact := true,
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")
},
publishArtifact in Test := false,
licenses := Seq("Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
homepage := Some(url("https://finagle.github.io/finagle-postgres")),
autoAPIMappings := true,
scmInfo := Some(
ScmInfo(
url("https://github.com/finagle/finagle-postgres"),
"scm:git:git@github.com:finagle/finagle-postgres.git"
)
),
pomExtra :=
<developers>
<developer>
<id>finagle</id>
<name>Finagle OSS</name>
<url>https://twitter.com/finagle</url>
</developer>
</developers>
)
lazy val allSettings = baseSettings ++ buildSettings ++ publishSettings
lazy val `finagle-postgres` = project.in(file("."))
.settings(moduleName := "finagle-postgres")
.settings(allSettings)
.configs(IntegrationTest)
lazy val `finagle-postgres-shapeless` = project
.settings(moduleName := "finagle-postgres-shapeless")
.settings(allSettings)
.settings(libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.3.2",
"io.github.jeremyrsmith" %% "patchless" % "1.0.4"
))
.configs(IntegrationTest)
.dependsOn(`finagle-postgres`)
val scaladocVersionPath = settingKey[String]("Path to this version's ScalaDoc")
val scaladocLatestPath = settingKey[String]("Path to latest ScalaDoc")
val tutPath = settingKey[String]("Path to tutorials")
lazy val docs = project
.settings(moduleName := "finagle-postgres-docs", buildSettings)
.enablePlugins(GhpagesPlugin, TutPlugin, ScalaUnidocPlugin)
.settings(
scaladocVersionPath := ("api/" + version.value),
scaladocLatestPath := (if (isSnapshot.value) "api/latest-snapshot" else "api/latest"),
tutPath := "doc",
includeFilter in makeSite := (includeFilter in makeSite).value || "*.md" || "*.yml",
addMappingsToSiteDir(tut in Compile, tutPath),
addMappingsToSiteDir(mappings in(ScalaUnidoc, packageDoc), scaladocLatestPath),
addMappingsToSiteDir(mappings in(ScalaUnidoc, packageDoc), scaladocVersionPath),
ghpagesNoJekyll := false,
git.remoteRepo := "git@github.com:finagle/finagle-postgres"
).dependsOn(`finagle-postgres`, `finagle-postgres-shapeless`)
parallelExecution in Test := false
test in Test in `finagle-postgres` := {
(test in Test in `finagle-postgres`).value
(test in Test in `finagle-postgres-shapeless`).value
}
scalacOptions ++= Seq(
"-deprecation"
)