-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
28 lines (23 loc) · 921 Bytes
/
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
import sbtassembly.MergeStrategy
scalacOptions += "-Xfatal-warnings"
ThisBuild / organization := "com.horothesun"
ThisBuild / organizationName := "horothesun"
ThisBuild / scalaVersion := "2.13.16"
val projectName = "demo-api-gateway-lambda"
lazy val root = project
.in(file("."))
.settings(name := projectName)
.settings(Dependencies.core)
.settings(
assembly / test := Def
.sequential(Test / test)
.value,
assembly / assemblyMergeStrategy := customMergeStrategy,
assembly / assemblyJarName := s"$projectName.jar"
)
val customMergeStrategy: String => MergeStrategy = {
case r if r.endsWith(".conf") => MergeStrategy.concat
case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
// https://stackoverflow.com/questions/46287789/running-an-uber-jar-from-sbt-assembly-results-in-error-could-not-find-or-load-m
case _ => MergeStrategy.first
}