This repository has been archived by the owner on Oct 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
129 lines (110 loc) · 3.14 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
import ReleaseTransformations._
// Constants //
val projectName = "http4s-active-requests"
val scala211 = "2.11.12"
val scala212 = "2.12.10"
// Lazy
lazy val scalaVersions = List(scala211, scala212)
// Groups //
val fs2G = "co.fs2"
val http4sG = "org.http4s"
val scalatestG = "org.scalatest"
val typelevelG = "org.typelevel"
// Artifacts //
val catsCoreA = "cats-core"
val catsEffectA = "cats-effect"
val fs2CoreA = "fs2-core"
val http4sServerA = "http4s-server"
val scalatestA = "scalatest"
// Versions //
val catsCoreV = "1.6.1"
val catsEffectV = "1.4.0"
val fs2V = "1.0.5"
val http4sV = "0.20.11"
val scalatestV = "3.0.8"
// GAVs //
lazy val catsCore = typelevelG %% catsCoreA % catsCoreV
lazy val catsEffect = typelevelG %% catsEffectA % catsEffectV
lazy val fs2Core = fs2G %% fs2CoreA % fs2V
lazy val http4sServer = http4sG %% http4sServerA % http4sV
lazy val scalatest = scalatestG %% scalatestA % scalatestV
// ThisBuild Scoped Settings //
ThisBuild / organization := "io.isomarcte"
ThisBuild / scalaVersion := scala212
ThisBuild / scalacOptions += "-target:jvm-1.8"
ThisBuild / javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
ThisBuild / dependencyOverrides ++= Seq(catsEffect, catsCore)
// General Configuration //
lazy val publishSettings = Seq(
homepage := Some(
url("https://github.com/isomarcte/http4s-active-requests")
),
licenses := Seq(
"BSD3" -> url("https://opensource.org/licenses/BSD-3-Clause")
),
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")
},
scmInfo := Some(
ScmInfo(
url("https://github.com/isomarcte/http4s-active-requests"),
"scm:git:[email protected]:isomarcte/http4s-active-requests.git"
)
),
developers := List(
Developer(
"isomarcte",
"David Strawn",
url("https://github.com/isomarcte")
)
),
credentials += Credentials(Path.userHome / ".sbt" / ".credentials"),
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
crossScalaVersions := scalaVersions
)
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
releaseStepCommandAndRemaining("+publishSigned"),
commitReleaseVersion,
tagRelease,
setNextVersion,
commitNextVersion,
pushChanges
)
// Root Project //
lazy val root = (project in file("."))
.settings(
name := projectName,
skip in publish := true
)
.aggregate(core)
.settings(publishSettings: _*)
// Projects //
lazy val core = project
.settings(
name := s"$projectName-core",
libraryDependencies ++= Seq(
fs2Core,
http4sServer,
scalatest % Test
),
addCompilerPlugin(
"org.spire-math" % "kind-projector" % "0.9.9" cross CrossVersion.binary
)
)
.settings(publishSettings: _*)