-
Notifications
You must be signed in to change notification settings - Fork 39
/
build.sbt
133 lines (121 loc) · 4.15 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
import ReleaseTransformations._
lazy val buildSettings = Seq(
organization := "io.github.finagle",
scalaVersion := "2.13.2",
crossScalaVersions := Seq("2.12.11", "2.13.2"),
fork in Test := true
)
def circeTestingVersion(scalaV: String) = {
if (scalaV.startsWith("2.11")) "0.11.2" else "0.12.3"
}
val baseSettings = Seq(
resolvers += Resolver.bintrayRepo("jeremyrsmith", "maven"),
libraryDependencies ++= Seq(
"com.twitter" %% "finagle-core" % "21.4.0",
"com.twitter" %% "finagle-netty4" % "21.4.0",
"org.scalatest" %% "scalatest" % "3.2.8" % "test,it",
"org.scalatestplus" %% "scalatestplus-scalacheck" % "3.1.0.0-RC2" % "test,it",
"org.scalacheck" %% "scalacheck" % "1.15.3" % "test,it",
"org.scalamock" %% "scalamock" % "4.4.0" % "test,it",
"io.circe" %% "circe-testing" % circeTestingVersion(scalaVersion.value) % "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,
pgpSecretRing := file("local.secring.gpg"),
pgpPublicRing := file("local.pubring.gpg"),
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseIgnoreUntrackedFiles := true,
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"
)
),
releaseVersionBump := sbtrelease.Version.Bump.Minor,
releaseProcess := {
Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
releaseStepCommandAndRemaining("+clean"),
releaseStepCommandAndRemaining("+test"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
)
},
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 shapelessRef = LocalProject("finagle-postgres-shapeless")
lazy val `finagle-postgres` = project
.in(file("."))
.settings(moduleName := "finagle-postgres")
.settings(allSettings)
.configs(IntegrationTest)
.aggregate(shapelessRef)
lazy val `finagle-postgres-shapeless` = project
.settings(moduleName := "finagle-postgres-shapeless")
.settings(allSettings)
.settings(
libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.3.3",
"io.github.jeremyrsmith" %% "patchless-core" % "1.0.7"
)
)
.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, 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(
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
scalacOptions ++= Seq(
"-deprecation"
)