-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
67 lines (53 loc) · 2.17 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
import sbtassembly.AssemblyKeys.assembly
import sbtassembly.AssemblyPlugin.autoImport.assemblyJarName
import sbtassembly.MergeStrategy
name := "cql-lambda"
organization := "com.gu"
description:= "Experimental query language for the Guardian's Content API"
version := "1.0"
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8"
)
val javaVersion = 21
initialize := {
// Ensure previous initializations are run
val _ = initialize.value
// Retrieve the JVM's class version and specification version
val classVersion = sys.props("java.class.version")
val specVersion = sys.props("java.specification.version")
assert(specVersion.toDouble >= javaVersion, s"Java ${javaVersion} or above is required to run this project.")
}
val PekkoVersion = "1.0.1"
val PekkoHttpVersion = "1.0.0"
val circeVersion = "0.14.4"
lazy val cql = project.in(file("."))
.enablePlugins(RiffRaffArtifact)
.settings(
scalaVersion := "3.4.2",
libraryDependencies ++= Seq(
"org.apache.pekko" %% "pekko-actor-typed" % PekkoVersion,
"org.apache.pekko" %% "pekko-stream" % PekkoVersion,
"org.apache.pekko" %% "pekko-http" % PekkoHttpVersion,
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"com.github.pjfanning" %% "pekko-http-circe" % "2.3.3",
"org.scalatest" %% "scalatest" % "3.2.9" % "test",
"com.gu" % "content-api-client-default_2.13" % "20.0.2",
"com.amazonaws" % "aws-lambda-java-core" % "1.2.3",
"com.amazonaws" % "aws-lambda-java-events" % "3.11.4",
"ch.qos.logback" % "logback-classic" % "1.4.7",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.5",
)
)
enablePlugins(RiffRaffArtifact)
assemblyJarName := s"cql-lambda.jar"
riffRaffPackageType := assembly.value
riffRaffUploadArtifactBucket := Option("riffraff-artifact")
riffRaffUploadManifestBucket := Option("riffraff-builds")
ThisBuild / assemblyMergeStrategy := {
case PathList("META-INF", x, xs @ _*) if x.toLowerCase == "services" => MergeStrategy.filterDistinctLines
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case x => MergeStrategy.first
}