-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
77 lines (64 loc) · 2.09 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
import Dependencies._
import sbt.url
import ReleaseTransformations._
import java.io.FileWriter
ThisBuild / organization := "uk.gov.nationalarchives"
ThisBuild / organizationName := "National Archives"
scalaVersion := "2.13.15"
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()
}
scmInfo := Some(
ScmInfo(
url("https://github.com/nationalarchives/tdr-generated-graphql"),
"[email protected]:nationalarchives/tdr-generated-graphql.git"
)
)
developers := List(
Developer(
id = "tna-da-bot",
name = "TNA Digital Archiving",
email = "[email protected]",
url = url("https://github.com/nationalarchives/tdr-generated-grapqhl")
)
)
description := "Classes to be used by the graphql client to communicate with the TDR graphql API"
licenses := List("MIT" -> new URL("https://choosealicense.com/licenses/mit/"))
homepage := Some(url("https://github.com/nationalarchives/tdr-generated-grapqhl"))
useGpgPinentry := true
publishTo := sonatypePublishToBundle.value
publishMavenStyle := true
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
releaseStepTask(setLatestTagOutput),
commitReleaseVersion,
tagRelease,
releaseStepCommand("publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)
resolvers +=
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
graphqlCodegenStyle := Apollo
graphqlCodegenJson := JsonCodec.Circe
graphqlCodegenImports ++= List("java.util.UUID", "java.time.ZonedDateTime", "java.time.LocalDateTime")
lazy val root = (project in file("."))
.settings(
name := "tdr-generated-graphql",
libraryDependencies ++=
Seq(
scalaTest % Test,
sangria,
circeCore,
circeGeneric
)
).enablePlugins(GraphQLCodegenPlugin)