-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
117 lines (106 loc) · 5.11 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
ThisBuild / version := "1.0.0"
lazy val iridium = "com.iridium"
lazy val scala3Version = "3.3.1"
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Common - contains domain model
///////////////////////////////////////////////////////////////////////////////////////////////////////////
lazy val core = (crossProject(JSPlatform, JVMPlatform) in file("common"))
.settings(
name := "common",
scalaVersion := scala3Version,
organization := iridium
)
.jvmSettings(
// add here if necessary
)
.jsSettings(
// Add JS-specific settings here
)
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Frontend
///////////////////////////////////////////////////////////////////////////////////////////////////////////
lazy val tyrianVersion = "0.6.1"
lazy val fs2DomVersion = "0.1.0"
lazy val laikaVersion = "0.19.0"
lazy val circeVersion = "0.14.1"
lazy val circeLiteralVersion = "0.14.9"
lazy val app = (project in file("app"))
.enablePlugins(ScalaJSPlugin)
.settings(
name := "app",
scalaVersion := scala3Version,
organization := iridium,
libraryDependencies ++= Seq(
"io.indigoengine" %%% "tyrian-io" % tyrianVersion,
"com.armanbilge" %%% "fs2-dom" % fs2DomVersion,
"org.planet42" %%% "laika-core" % laikaVersion,
"io.circe" %%% "circe-core" % circeVersion,
"io.circe" %%% "circe-parser" % circeVersion,
"io.circe" %%% "circe-generic" % circeVersion
),
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule) },
semanticdbEnabled := true,
autoAPIMappings := true
)
.dependsOn(core.js)
lazy val catsEffectVersion = "3.3.14"
lazy val http4sVersion = "0.23.15"
lazy val doobieVersion = "1.0.0-RC1"
lazy val pureConfigVersion = "0.17.7"
lazy val log4catsVersion = "2.4.0"
lazy val tsecVersion = "0.4.0"
lazy val scalaTestVersion = "3.2.12"
lazy val scalaTestCatsEffectVersion = "1.4.0"
lazy val testContainerVersion = "1.17.3"
lazy val logbackVersion = "1.4.0"
lazy val slf4jVersion = "2.0.0"
lazy val javaMailVersion = "1.6.2"
lazy val stripeVersion = "22.12.0"
lazy val flywayVersion = "6.3.1"
lazy val h2Version = "1.4.200"
lazy val server = (project in file("server"))
.settings(
name := "server",
scalaVersion := scala3Version,
organization := iridium,
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % catsEffectVersion,
"org.http4s" %% "http4s-dsl" % http4sVersion,
"org.http4s" %% "http4s-ember-server" % http4sVersion,
"org.http4s" %% "http4s-ember-client" % http4sVersion,
"org.http4s" %% "http4s-circe" % http4sVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-fs2" % circeVersion,
"org.tpolecat" %% "doobie-core" % doobieVersion,
"org.tpolecat" %% "doobie-hikari" % doobieVersion,
"org.tpolecat" %% "doobie-postgres" % doobieVersion,
"org.flywaydb" % "flyway-core" % flywayVersion,
"org.tpolecat" %% "doobie-h2" % doobieVersion,
"com.h2database" % "h2" % h2Version,
"com.github.pureconfig" %% "pureconfig-core" % pureConfigVersion,
"com.github.pureconfig" %% "pureconfig-cats-effect" % pureConfigVersion,
"org.typelevel" %% "log4cats-slf4j" % log4catsVersion,
"org.slf4j" % "slf4j-simple" % slf4jVersion,
"io.github.jmcardon" %% "tsec-http4s" % tsecVersion,
"com.sun.mail" % "javax.mail" % javaMailVersion,
"com.stripe" % "stripe-java" % stripeVersion,
) ++ Seq(
"io.circe" %% "circe-literal" % circeLiteralVersion,
"org.scalatest" %% "scalatest" % scalaTestVersion,
"org.tpolecat" %% "doobie-scalatest" % doobieVersion,
"org.typelevel" %% "log4cats-noop" % log4catsVersion,
"org.typelevel" %% "cats-effect-testing-scalatest" % scalaTestCatsEffectVersion,
"org.testcontainers" % "testcontainers" % testContainerVersion ,
"org.testcontainers" % "postgresql" % testContainerVersion ,
"ch.qos.logback" % "logback-classic" % logbackVersion
).map(_ % Test),
Compile / mainClass := Some("com.iridium.application.Application"),
scalacOptions ++= Seq(
// Fix for: method derived is declared as `inline`, but was not inlined
// which happens at circe automatic derivation for response.as[AsteroidDetail]
// where AsteroidDetail is a case class containing case class, containing cas class, etc
"-Xmax-inlines", "70",
"-Wnonunit-statement"
)
)
.dependsOn(core.jvm)