-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
executable file
·90 lines (81 loc) · 3.22 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
name := "pwa.pool"
lazy val akkaVersion = "2.6.21" // Don't upgrade due to BUSL 1.1!
lazy val akkaHttpVersion = "10.2.10" // Don't upgrade due to BUSL 1.1!
lazy val quillVersion = "3.10.0" // Don't upgrade, 3.11 contains dev.zio
lazy val laminarVersion = "17.2.0"
lazy val scalaJavaTimeVersion = "2.6.0"
lazy val upickleVersion = "4.1.0"
lazy val scalaTestVersion = "3.2.19"
lazy val common = Defaults.coreDefaultSettings ++ Seq(
organization := "objektwerks",
version := "0.1-SNAPSHOT",
scalaVersion := "2.13.16"
)
lazy val pool = project.in(file("."))
.aggregate(sharedJs, sharedJvm, js, jvm)
.settings(common)
.settings(
publish := {},
publishLocal := {}
)
lazy val shared = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.in(file("shared"))
.settings(common)
.settings(
libraryDependencies ++= Seq(
"com.lihaoyi" %% "upickle" % upickleVersion,
"io.github.cquiroz" %% "scala-java-time" % scalaJavaTimeVersion,
"org.scalatest" %% "scalatest" % scalaTestVersion % Test
)
)
lazy val sharedJs = shared.js
lazy val sharedJvm = shared.jvm
lazy val public = "scala-2.13/classes/public"
import NativePackagerHelper._
lazy val js = (project in file("js"))
.dependsOn(sharedJs)
.enablePlugins(ScalaJSPlugin, UniversalPlugin)
.settings(common)
.settings(
libraryDependencies ++= Seq(
"com.raquo" %%% "laminar" % laminarVersion,
"com.lihaoyi" %%% "upickle" % upickleVersion,
"io.github.cquiroz" %%% "scala-java-time" % scalaJavaTimeVersion
),
Compile / scalacOptions ~= (_ filter (_ == "-deprecation")),
Compile / fastLinkJS / scalaJSLinkerOutputDirectory := target.value / public / "js",
Compile / fullLinkJS / scalaJSLinkerOutputDirectory := target.value / public / "js",
fastLinkJS / crossTarget := target.value / public,
fullLinkJS / crossTarget := target.value / public,
Universal / mappings := (Universal / mappings).value ++ contentOf(target.value / public)
)
lazy val jvm = (project in file("jvm"))
.dependsOn(sharedJvm)
.enablePlugins(JavaServerAppPackaging)
.configs(IntegrationTest)
.settings(common)
.settings(
Defaults.itSettings,
reStart / mainClass := Some("pool.Server"),
libraryDependencies ++= {
Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"de.heikoseeberger" %% "akka-http-upickle" % "1.39.2",
"io.getquill" %% "quill-sql" % quillVersion,
"io.getquill" %% "quill-async-postgres" % quillVersion,
"com.github.cb372" %% "scalacache-caffeine" % "0.28.0",
"org.jodd" % "jodd-mail" % "7.1.0",
"com.typesafe" % "config" % "1.4.3",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.5",
"ch.qos.logback" % "logback-classic" % "1.5.15",
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % IntegrationTest,
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % IntegrationTest,
"org.scalatest" %% "scalatest" % scalaTestVersion % IntegrationTest
)
},
scalacOptions ++= Seq("-Ywarn-macros:after")
)