-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sbt
187 lines (165 loc) · 6.08 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
179
180
181
182
183
184
185
186
187
import sbtrelease.ExtraReleaseCommands
import sbtrelease.ReleaseStateTransformations._
import sbtrelease.tagsonly.TagsOnly._
lazy val fs2Version = "3.11.0"
lazy val catsEffectVersion = "3.5.2"
lazy val scalatestVersion = "3.2.19"
lazy val awsSdkVersion = "2.29.23"
lazy val scalacheckVersion = "1.18.1"
lazy val scalatestScalacheckVersion = "3.1.1.1"
lazy val slf4jVersion = "1.7.36"
lazy val log4jVersion = "2.24.2"
lazy val http4sVersion = "0.23.29"
lazy val http4sBlazeClientVersion = "0.23.17"
lazy val scalaXmlVersion = "2.3.0"
lazy val circeVersion = "0.12.2"
lazy val scodecBitsVersion = "1.1.12"
lazy val commonCodecVersion = "1.17.1"
lazy val IntegrationTest = config("it") extend Test
lazy val noPublishSettings = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)
lazy val publicArtifactory = "Artifactory Realm" at "https://kaluza.jfrog.io/artifactory/maven"
lazy val publishOptions = Seq(
publishTo := Some(publicArtifactory),
credentials += {
for {
usr <- sys.env.get("ARTIFACTORY_USER")
password <- sys.env.get("ARTIFACTORY_PASS")
} yield Credentials("Artifactory Realm", "kaluza.jfrog.io", usr, password)
}.getOrElse(Credentials(Path.userHome / ".ivy2" / ".credentials")),
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
releaseStepCommand(ExtraReleaseCommands.initialVcsChecksCommand),
setVersionFromTags(releaseTagPrefix.value),
runClean,
tagRelease,
publishArtifacts,
pushTagsOnly
)
)
lazy val root = (project in file("."))
.aggregate(auth, common, s3)
.configs(IntegrationTest)
.settings(publishOptions)
.settings(
name := "comms-aws",
inThisBuild(
List(
organization := "com.ovoenergy.comms",
organizationName := "OVO Energy",
organizationHomepage := Some(url("https://ovoenergy.com")),
// TODO Extract contributors from github
developers := List(
Developer(
"filosganga",
"Filippo De Luca",
url("https://github.com/filosganga")
),
Developer(
"laurence-bird",
"Laurence Bird",
url("https://github.com/laurence-bird")
),
Developer(
"SystemFw",
"Fabio Labella",
url("https://github.com/SystemFw")
),
Developer(
"ZsoltBalvanyos",
"Zsolt Balvanyos",
url("https://github.com/ZsoltBalvanyos")
)
),
startYear := Some(2018),
licenses := Seq("Apache-2.0" -> url("https://opensource.org/licenses/apache-2.0")),
scmInfo := Some(
ScmInfo(
url("https://github.com/ovotech/comms-aws"),
"scm:git:[email protected]:ovotech/comms-aws.git"
)
),
scalaVersion := "2.13.15",
crossScalaVersions += "2.12.20",
resolvers ++= Seq(
publicArtifactory
),
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-core" % http4sVersion,
"org.http4s" %% "http4s-client" % http4sVersion,
"co.fs2" %% "fs2-core" % fs2Version,
"co.fs2" %% "fs2-io" % fs2Version,
"org.slf4j" % "slf4j-api" % slf4jVersion
),
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % scalatestVersion,
"org.typelevel" %% "cats-effect-testing-scalatest" % "1.5.0",
"org.scalacheck" %% "scalacheck" % scalacheckVersion,
"org.scalatestplus" %% "scalacheck-1-14" % scalatestScalacheckVersion,
"org.apache.logging.log4j" % "log4j-api" % log4jVersion,
"org.apache.logging.log4j" % "log4j-slf4j-impl" % log4jVersion,
"org.http4s" %% "http4s-blaze-client" % http4sBlazeClientVersion
).map(_ % s"$Test,$IntegrationTest"),
scalafmtOnCompile := true
)
)
)
lazy val common = (project in file("modules/common"))
.enablePlugins(AutomateHeaderPlugin)
.configs(IntegrationTest)
.settings(publishOptions)
.settings(
name := "comms-aws-common",
scalacOptions -= "-Xfatal-warnings" // enable all options from sbt-tpolecat except fatal warnings
)
.settings(inConfig(IntegrationTest)(Defaults.itSettings))
.settings(automateHeaderSettings(IntegrationTest))
.settings(
libraryDependencies ++= Seq(
"software.amazon.awssdk" % "auth" % awsSdkVersion,
"software.amazon.awssdk" % "sdk-core" % awsSdkVersion % Optional
)
)
lazy val auth = (project in file("modules/auth"))
.enablePlugins(AutomateHeaderPlugin)
.dependsOn(common % s"$Compile->$Compile;$Test->$Test;$IntegrationTest->$IntegrationTest")
.configs(IntegrationTest)
.settings(publishOptions)
.settings(
name := "comms-aws-auth",
scalacOptions -= "-Xfatal-warnings" // enable all options from sbt-tpolecat except fatal warnings
)
.settings(inConfig(IntegrationTest)(Defaults.itSettings))
.settings(automateHeaderSettings(IntegrationTest))
.settings(
libraryDependencies ++= Seq(
"commons-codec" % "commons-codec" % commonCodecVersion,
"software.amazon.awssdk" % "s3" % awsSdkVersion % s"$Test,$IntegrationTest"
)
)
lazy val s3 = (project in file("modules/s3"))
.enablePlugins(AutomateHeaderPlugin)
.dependsOn(common % s"$Compile->$Compile;$Test->$Test;$IntegrationTest->$IntegrationTest", auth)
.configs(IntegrationTest)
.settings(publishOptions)
.settings(
name := "comms-aws-s3",
scalacOptions -= "-Xfatal-warnings" // enable all options from sbt-tpolecat except fatal warnings
)
.settings(inConfig(IntegrationTest)(Defaults.itSettings))
.settings(automateHeaderSettings(IntegrationTest))
.settings(
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-scala-xml" % "0.23.14",
"org.scala-lang.modules" %% "scala-xml" % scalaXmlVersion,
"org.http4s" %% "http4s-blaze-client" % http4sBlazeClientVersion % Optional,
"software.amazon.awssdk" % "s3" % awsSdkVersion % s"$Test,$IntegrationTest"
)
)