-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
102 lines (94 loc) · 3.88 KB
/
build.sbt
File metadata and controls
102 lines (94 loc) · 3.88 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
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
import org.scalajs.linker.interface.ModuleKind
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / scalaVersion := "3.5.2"
ThisBuild / organization := "org.ssbudget"
// Dependency versions (only for deps used in multiple modules)
val http4sVersion = "0.23.30"
val tapirVersion = "1.11.11"
val circeVersion = "0.14.10"
val doobieVersion = "1.0.0-RC6"
val sttpVersion = "3.10.2"
lazy val root = (project in file("."))
.aggregate(shared.jvm, shared.js, backend, frontend, e2e)
.settings(
name := "ssbudget",
publish := {},
publishLocal := {}
)
lazy val e2e = (project in file("e2e"))
.dependsOn(backend % "test->test;test->compile")
.settings(
name := "e2e",
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
"org.seleniumhq.selenium" % "selenium-java" % "4.27.0" % Test,
"io.github.bonigarcia" % "webdrivermanager" % "5.9.2" % Test
),
Test / fork := true,
Test / javaOptions ++= Seq(
s"-Duser.dir=${baseDirectory.value.getAbsolutePath}"
)
)
lazy val shared = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.in(file("shared"))
.settings(
name := "shared",
libraryDependencies ++= Seq(
"com.softwaremill.sttp.tapir" %%% "tapir-core" % tapirVersion,
"com.softwaremill.sttp.tapir" %%% "tapir-json-circe" % tapirVersion,
"io.circe" %%% "circe-core" % circeVersion
)
)
.jsSettings(
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % "2.6.0"
)
)
lazy val backend = (project in file("backend"))
.enablePlugins(JavaAppPackaging)
.dependsOn(shared.jvm)
.settings(
name := "backend",
Compile / mainClass := Some("ssbudget.backend.Main"),
executableScriptName := "ssbudget",
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % "3.5.7",
"org.http4s" %% "http4s-ember-server" % http4sVersion,
"org.http4s" %% "http4s-dsl" % http4sVersion,
"org.http4s" %% "http4s-circe" % http4sVersion,
"com.softwaremill.sttp.tapir" %% "tapir-http4s-server" % tapirVersion,
"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % tapirVersion,
"com.softwaremill.sttp.client3" %% "cats" % sttpVersion,
"io.circe" %% "circe-generic" % circeVersion,
"ch.qos.logback" % "logback-classic" % "1.5.15",
// Database
"org.tpolecat" %% "doobie-core" % doobieVersion,
"org.tpolecat" %% "doobie-hikari" % doobieVersion,
"org.xerial" % "sqlite-jdbc" % "3.47.2.0",
"org.flywaydb" % "flyway-core" % "10.22.0",
// Authentication
"de.mkammerer" % "argon2-jvm" % "2.11",
"com.yubico" % "webauthn-server-core" % "2.5.3",
// Testing
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
"org.typelevel" %% "cats-effect-testing-scalatest" % "1.6.0" % Test
),
Compile / run / fork := true
)
lazy val frontend = (project in file("frontend"))
.enablePlugins(ScalaJSPlugin)
.dependsOn(shared.js)
.settings(
name := "frontend",
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) },
scalaJSUseMainModuleInitializer := true,
libraryDependencies ++= Seq(
"com.raquo" %%% "laminar" % "17.2.0",
"com.raquo" %%% "waypoint" % "10.0.0-M1",
"com.softwaremill.sttp.tapir" %%% "tapir-sttp-client" % tapirVersion,
"com.softwaremill.sttp.client3" %%% "core" % sttpVersion,
"io.circe" %%% "circe-generic" % circeVersion,
"io.circe" %%% "circe-parser" % circeVersion
)
)