-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
109 lines (101 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
import sbtrelease.ReleaseStateTransformations.*
import Dependencies.*
lazy val scala3Version = "3.6.2"
ThisBuild / scalaVersion := scala3Version
lazy val releaseSettings = Seq(
useGpgPinentry := true,
publishTo := sonatypePublishToBundle.value,
publishMavenStyle := true,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommand("publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
),
resolvers +=
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
version := (ThisBuild / version).value,
organization := "uk.gov.nationalarchives",
organizationName := "National Archives",
scmInfo := Some(
ScmInfo(
url("https://github.com/nationalarchives/dr2-preservica-client"),
"git@github.com:nationalarchives/dr2-preservica-client.git"
)
),
developers := List(
Developer(
id = "tna-da-bot",
name = "TNA Digital Archiving",
email = "181243999+tna-da-bot@users.noreply.github.com",
url = url("https://github.com/nationalarchives/dr2-preservica-client")
)
),
description := "A client to communicate with the Preservica API",
licenses := List("MIT" -> new URL("https://choosealicense.com/licenses/mit/")),
homepage := Some(url("https://github.com/nationalarchives/dr2-preservica-client"))
)
lazy val commonSettings = Seq(
scalaVersion := scala3Version,
libraryDependencies ++= Seq(
secretsManagerClient,
catsCore,
circeGeneric,
scalaCacheCore,
scalaCacheCaffeine,
log4Cats,
scalaXml,
sttpCore,
sttpFs2,
sttpCirce,
mockito % Test,
scalaTest % Test,
wireMock % Test
),
version := version.value,
scalacOptions ++= Seq("-Wunused:imports", "-Werror", "-deprecation", "-Xmax-inlines", "50"),
Test / fork := true,
Test / envVars := Map("AWS_ACCESS_KEY_ID" -> "test", "AWS_SECRET_ACCESS_KEY" -> "test")
) ++ releaseSettings
lazy val fs2Ref = LocalProject("fs2")
lazy val root: Project = project
.in(file("."))
.settings(commonSettings)
.enablePlugins(ScalaUnidocPlugin)
.settings(
name := "preservica-client-root"
)
.aggregate(fs2Ref)
lazy val fs2 = project
.in(file("fs2"))
.settings(commonSettings)
.settings(
name := "preservica-client-fs2",
libraryDependencies += sttpFs2
)
.dependsOn(root % "compile->compile;test->test")
lazy val docs = (project in file("site-docs"))
.settings(
name := "dr2-preservica-client",
description := "Documentation for the Scala Preservica client",
publish / skip := true
)
.enablePlugins(ParadoxSitePlugin, ScalaUnidocPlugin, SitePreviewPlugin)
.settings(
paradoxProperties += (
"version" -> (ThisBuild / version).value.split("-").head
),
paradoxTheme := Some(builtinParadoxTheme("generic")),
ScalaUnidoc / siteSubdirName := "api",
addMappingsToSiteDir(ScalaUnidoc / packageDoc / mappings, ScalaUnidoc / siteSubdirName)
)
.dependsOn(root % "compile->compile")
.dependsOn(fs2 % "compile->compile")