-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
118 lines (108 loc) · 3.66 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
import sbtrelease.ReleaseStateTransformations.*
import sbtversionpolicy.withsbtrelease.ReleaseVersion
val assemblySettings = Seq(
assembly / assemblyMergeStrategy := {
case path if path.endsWith("module-info.class") => MergeStrategy.last
case PathList("META-INF", "io.netty.versions.properties") => MergeStrategy.first //see https://github.com/sbt/sbt-assembly/issues/362
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
}
)
inThisBuild(Seq(
scalaVersion := "3.3.4",
crossScalaVersions := Seq("2.13.16", scalaVersion.value),
scalacOptions ++= Seq(
"-deprecation",
"-Xfatal-warnings",
"-encoding", "UTF-8",
"-release:11",
),
// sonatype metadata
organization := "com.gu",
licenses := Seq(License.Apache2),
))
val awsSdkVersion = "2.29.40"
val circeVersion = "0.14.10"
val flexmarkVersion = "0.64.8"
val scalaTestVersion = "3.2.19"
val scalaLoggingVersion = "3.9.5"
//Projects
lazy val root = project
.in(file("."))
.settings(
name := "anghammarad-root",
publish / skip := true,
// publish settings, for common and client
releaseCrossBuild := true,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
setNextVersion,
commitNextVersion,
),
releaseVersion := ReleaseVersion.fromAggregatedAssessedCompatibilityWithLatestRelease().value,
)
.aggregate(anghammarad, client, common, dev)
lazy val common = project
.settings(
name := "anghammarad-common",
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % scalaTestVersion % Test
)
)
lazy val client = project
.dependsOn(common)
.settings(
name := "anghammarad-client",
libraryDependencies ++= Seq(
"software.amazon.awssdk" % "sns" % awsSdkVersion,
"org.json" % "json" % "20250107",
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingVersion,
"org.scalatest" %% "scalatest" % scalaTestVersion % Test
),
assemblySettings,
)
lazy val anghammarad = project
.enablePlugins(JavaAppPackaging, ScalafixPlugin)
.dependsOn(common)
.settings(
name := "anghammarad",
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0",
"com.amazonaws" % "aws-lambda-java-events" % "3.14.0",
"com.amazonaws" % "aws-lambda-java-core" % "1.2.3",
"software.amazon.awssdk" % "lambda" % awsSdkVersion,
"software.amazon.awssdk" % "ses" % awsSdkVersion,
"software.amazon.awssdk" % "s3" % awsSdkVersion,
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"com.softwaremill.sttp.client3" %% "core" % "3.10.2",
"com.vladsch.flexmark" % "flexmark" % flexmarkVersion,
"com.vladsch.flexmark" % "flexmark-ext-gfm-strikethrough" % flexmarkVersion,
"com.vladsch.flexmark" % "flexmark-ext-tables" % flexmarkVersion,
"com.vladsch.flexmark" % "flexmark-util" % flexmarkVersion,
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingVersion,
"ch.qos.logback" % "logback-classic" % "1.5.16",
"org.scalatest" %% "scalatest" % scalaTestVersion % Test
),
assembly / assemblyOutputPath := file("anghammarad/anghammarad.jar"),
assemblySettings,
publish / skip := true,
)
lazy val dev = project
.settings(
name := "dev",
libraryDependencies ++= Seq(
"com.github.scopt" %% "scopt" % "4.1.0"
),
assemblySettings,
publish / skip := true,
)
.dependsOn(common, anghammarad, client)