Repository navigation
Expand file tree
/
Copy pathbuild.sbt
More file actions
53 lines (43 loc) · 1.72 KB
/
Copy pathbuild.sbt
File metadata and controls
53 lines (43 loc) · 1.72 KB
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
import org.typelevel.sbt.tpolecat.DevMode
name := "goi-machine"
scalaVersion := "2.13.13"
val sttpV = "3.9.6"
val tapirV = "1.10.6"
val circeV = "0.14.1"
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.5.6",
"com.github.jwt-scala" %% "jwt-circe" % "10.0.1",
"com.softwaremill.sttp.client3" %% "core" % sttpV,
"com.softwaremill.sttp.client3" %% "circe" % sttpV,
"com.softwaremill.sttp.tapir" %% "tapir-core" % tapirV,
// exclude netty-codec-http2 to prevent conflict with store4s-rpc
"com.softwaremill.sttp.tapir" %% "tapir-netty-server" % tapirV exclude ("io.netty", "netty-codec-http2"),
"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % tapirV,
"com.softwaremill.sttp.tapir" %% "tapir-files" % tapirV,
"com.typesafe" % "config" % "1.4.3",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.4",
"io.circe" %% "circe-core" % circeV,
"io.circe" %% "circe-generic" % circeV,
"io.circe" %% "circe-parser" % circeV,
"net.pishen" %% "store4s-rpc" % "0.20.0"
)
ThisBuild / tpolecatDefaultOptionsMode := DevMode
// assembly
assembly / mainClass := Some("core.Main")
assembly / assemblyJarName := "app.jar"
assembly / assemblyMergeStrategy := {
case "META-INF/io.netty.versions.properties" => MergeStrategy.first
case PathList(ps @ _*) if ps.last == "module-info.class" =>
MergeStrategy.first
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
}
// App Engine
lazy val prepareForDeploy = taskKey[Unit]("Prepare for deploy")
prepareForDeploy := {
val deployDir = target.value / "deploy"
IO.copyFile(assembly.value, deployDir / "app.jar")
val yamlDestPath = deployDir / "app.yaml"
IO.copyFile(baseDirectory.value / "app.yaml", yamlDestPath)
}