-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
178 lines (164 loc) · 4.47 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name := "payment-systems-api-collection"
scalaVersion := "2.13.0"
organization in ThisBuild := "com.github.unknownnpc.psw"
lazy val global = project
.in(file("."))
.settings(settings ++ Seq(
skip in publish := true
))
.aggregate(
api,
privat24,
qiwi,
webmoney,
advcash
)
lazy val api = project
.settings(
name := "api",
settings,
mavenPublishSettings,
libraryDependencies ++= commonDependencies ++ Seq(
dependencies.httpClient
)
)
lazy val privat24 = project
.settings(
name := "privat24",
settings,
mavenPublishSettings,
libraryDependencies ++= commonDependencies ++ Seq(
dependencies.scalaXml
)
)
.dependsOn(
api
)
lazy val qiwi = project
.settings(
name := "qiwi",
settings,
mavenPublishSettings,
libraryDependencies ++= commonDependencies ++ Seq(
dependencies.json4s
)
)
.dependsOn(
api
)
lazy val webmoney = project
.settings(
name := "webmoney",
settings,
mavenPublishSettings,
libraryDependencies ++= commonDependencies ++ Seq(
dependencies.scalaXml
)
)
.dependsOn(
api
)
lazy val advcash = project
.settings(
name := "advcash",
settings,
mavenPublishSettings,
libraryDependencies ++= commonDependencies ++ Seq(
dependencies.scalaXml
)
)
.dependsOn(
api
)
lazy val dependencies =
new {
private val logbackV = "1.2.3"
private val scalaLoggingV = "3.9.2"
private val slf4jV = "1.7.25"
private val typesafeConfigV = "1.3.4"
private val catsV = "2.0.0-M4"
private val scalatestV = "3.0.8"
private val scalacheckV = "1.14.0"
private val httpClientV = "4.5.9"
private val scalaXmlV = "1.2.0"
private val mockitoV = "1.5.12"
private val json4sV = "3.6.7"
val logback = "ch.qos.logback" % "logback-classic" % logbackV
val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingV
val typesafeConfig = "com.typesafe" % "config" % typesafeConfigV
val scalatest = "org.scalatest" %% "scalatest" % scalatestV
val httpClient = "org.apache.httpcomponents" % "httpclient" % httpClientV
val scalacheck = "org.scalacheck" %% "scalacheck" % scalacheckV
val scalaXml = "org.scala-lang.modules" %% "scala-xml" % scalaXmlV
val cats = "org.typelevel" %% "cats-core" % catsV
val mockito = "org.mockito" %% "mockito-scala" % mockitoV
val json4s = "org.json4s" %% "json4s-native" % json4sV
}
lazy val commonDependencies = Seq(
dependencies.logback,
dependencies.scalaLogging,
dependencies.typesafeConfig,
dependencies.scalatest % "test",
dependencies.scalacheck % "test",
dependencies.mockito % "test"
)
lazy val settings =
commonSettings
lazy val compilerOptions = Seq(
"-unchecked",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-language:postfixOps",
"-deprecation",
"-encoding",
"utf8"
)
lazy val commonSettings = Seq(
scalacOptions ++= compilerOptions,
resolvers ++= Seq(
Resolver.mavenLocal,
Resolver.sonatypeRepo("releases")
)
)
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
lazy val mavenPublishSettings = Seq(
homepage := Some(url("https://github.com/UnknownNPC/payment-systems-api-collection")),
licenses := Seq("MIT" -> url("https://github.com/UnknownNPC/payment-systems-api-collection/LICENSE.md")),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
publishTo in ThisBuild := {
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/UnknownNPC/payment-systems-api-collection"),
"scm:git:[email protected]:UnknownNPC/payment-systems-api-collection.git"
)
),
developers := List(
Developer("UnknownNPC", "Vitalii Zymukha", "[email protected]", url("https://github.com/UnknownNPC"))
),
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
pushChanges
)
)