-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
94 lines (86 loc) · 2.7 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
import Dependencies._
import ReleaseTransformations._
import java.io.FileWriter
ThisBuild / scalaVersion := "2.13.15"
ThisBuild / organization := "uk.gov.nationalarchives"
ThisBuild / organizationName := "The National Archives"
lazy val setLatestTagOutput = taskKey[Unit]("Sets a GitHub actions output for the latest tag")
setLatestTagOutput := {
val fileWriter = new FileWriter(sys.env("GITHUB_OUTPUT"), true)
fileWriter.write(s"latest-tag=${(ThisBuild / version).value}\n")
fileWriter.close()
}
lazy val root = (project in file("."))
.settings(
releaseProcess := Seq[ReleaseStep](
inquireVersions,
setReleaseVersion,
releaseStepTask(setLatestTagOutput),
commitReleaseVersion,
tagRelease,
pushChanges,
releaseStepTask(bagitExport / Universal / packageZipTarball),
releaseStepTask(export / Universal / packageZipTarball),
setNextVersion,
commitNextVersion,
pushChanges
)
)
.aggregate(bagitExport, export)
val commonSettings = Seq(
libraryDependencies ++= Seq(
s3Utils,
catsEffect,
decline,
declineEffect,
log4cats,
log4catsSlf4j,
mockitoScala % Test,
mockitoScalaTest % Test,
pureConfig,
pureConfigCatsEffect,
scalaTest % Test,
slf4j,
stepFunctionUtils
),
(Test / fork) := true,
(Test / envVars) := Map("AWS_ACCESS_KEY_ID" -> "test", "AWS_SECRET_ACCESS_KEY" -> "test"),
(Test / javaOptions) += s"-Dconfig.file=${sourceDirectory.value}/test/resources/application.conf",
buildInfoKeys := Seq[BuildInfoKey](version),
buildInfoPackage := "uk.gov.nationalarchives.consignmentexport",
)
lazy val export = (project in file("export"))
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
awsRds,
doobie,
doobiePostgres,
snsUtils,
catsEffectTest % Test,
testContainers % Test,
testContainersPostgres % Test,
postgres % Test,
wiremock % Test
),
name := "tdr-export",
(Universal / packageName) := "tdr-export",
).enablePlugins(JavaAppPackaging, UniversalPlugin, BuildInfoPlugin)
lazy val bagitExport = (project in file("bagit-export"))
.settings(commonSettings)
.settings(
name := "tdr-consignment-export",
libraryDependencies ++= Seq(
authUtils,
bagit,
generatedGraphql,
graphqlClient,
keycloakCore,
keycloakAdminClient,
scalaCsv,
slf4j
),
(Universal / packageName) := "tdr-consignment-export",
dependencyOverrides += "org.scala-lang.modules" %% "scala-java8-compat" % "1.0.2",
(Test / javaOptions) += s"-Dconfig.file=${sourceDirectory.value}/test/resources/application.conf"
).enablePlugins(JavaAppPackaging, UniversalPlugin, BuildInfoPlugin)