This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
135 lines (113 loc) · 3.89 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
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
organization := "com.github.vital-software"
name := "scala-redox"
scalaVersion := "2.12.10"
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots"),
Resolver.jcenterRepo,
"Typesafe Repo" at "https://repo.typesafe.com/typesafe/releases/",
"Typesafe Repo" at "https://repo.typesafe.com/typesafe/releases/",
"Atlassian Releases" at "https://maven.atlassian.com/public/",
)
val playJsonVersion = "2.7.3"
val playVersion = "2.7.3"
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-json" % playJsonVersion,
"com.typesafe.play" %% "play-json-joda" % playJsonVersion,
"com.typesafe.play" %% "play-ahc-ws" % playVersion,
"com.typesafe.play" %% "play-ws-standalone-json" % "1.1.2",
"com.typesafe.akka" %% "akka-http" % "10.1.8",
"com.github.vital-software" %% "json-annotation" % "0.6.0",
"com.github.nscala-time" %% "nscala-time" % "2.14.0",
"com.typesafe.play" %% "play-specs2" % playVersion % Test,
)
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
ThisBuild / scalacOptions ++= Seq("-unchecked", "-deprecation")
publishMavenStyle := 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")
}
Test / publishArtifact := false
pomIncludeRepository := { _ =>
false
}
sonatypeProfileName := "com.github.vital-software"
pomExtra := (<url>https://github.com/vital-software/scala-redox</url>
<licenses>
<license>
<name>MIT</name>
<url>http://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:vital-software/scala-redox.git</url>
<connection>scm:git:[email protected]:vital-software/scala-redox.git</connection>
</scm>
<developers>
<developer>
<id>apatzer</id>
<name>Aaron Patzer</name>
<url>https://github.com/apatzer</url>
</developer>
</developers>)
// GPG settings
credentials += Credentials(
"GnuPG Key ID",
"gpg",
"B9513278AF9A10374E07A88FAA24C7523BD70F36",
"ignored"
)
// Release settings
releaseTagName := s"${if (releaseUseGlobalVersion.value) (ThisBuild / version).value else version.value}" // Remove v prefix
releaseTagComment := s"Releasing ${(ThisBuild / version).value}\n\n[skip ci]"
releaseCommitMessage := s"Setting version to ${(ThisBuild / version).value}\n\n[skip ci]"
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
setReleaseVersion,
updateLines,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
)
// Test settings
Test / testOptions ++= Seq(
Tests.Argument("junitxml")
)
val unreleasedCompare = """^\[Unreleased\]: https://github\.com/(.*)/compare/(.*)\.\.\.HEAD$""".r
updateLinesSchema := Seq(
UpdateLine(
file("README.md"),
_.contains("""libraryDependencies += "com.github.vital-software" %% "scala-redox" % """),
(v, _) => s"""libraryDependencies += "com.github.vital-software" %% "scala-redox" % "$v""""
),
UpdateLine(
file("CHANGELOG.md"),
_.contains("## [Unreleased]"),
(v, _) => s"## [Unreleased]\n\n## [$v] - ${java.time.LocalDate.now}"
),
UpdateLine(
file("CHANGELOG.md"),
unreleasedCompare.unapplySeq(_).isDefined,
(v, compareLine) =>
compareLine match {
case unreleasedCompare(project, previous) =>
s"[Unreleased]: https://github.com/$project/compare/$v...HEAD\n[$v]: https://github.com/$project/compare/$previous...$v"
}
),
)
mimaPreviousArtifacts := Set(organization.value %% name.value % "8.0.1")
mimaBinaryIssueFilters ++= Seq(
// e.g. ProblemFilters.exclude[MissingClassProblem]("co.vitaler.events.*"),
)