-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sbt
62 lines (55 loc) · 1.9 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
ThisBuild / version := "2.0.1"
ThisBuild / scalaVersion := "2.13.3"
lazy val scalajs = (project in file("scalajs"))
.enablePlugins(ScalaJSPlugin)
.enablePlugins(ScalaJSWeb)
.settings(scalajsSettings)
lazy val scalajvm = (project in file("scalajvm"))
.enablePlugins(PlayScala)
.enablePlugins(SbtWeb)
.settings(scalajvmSettings)
lazy val scalajsSettings = Seq(
name := "scalajs",
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "1.1.0"
) ++ Seq(
"io.circe" %%% "circe-generic",
"io.circe" %%% "circe-parser"
).map(_ % "0.13.0"),
scalacOptions ++= sharedScalacOptions,
scalaJSUseMainModuleInitializer := true,
scalaJSStage := FullOptStage
) ++ sharedDirectorySettings
lazy val scalajvmSettings = Seq(
name := "scalajvm",
libraryDependencies ++= Seq(
guice,
evolutions,
jdbc,
specs2 % Test,
"org.scalikejdbc" %% "scalikejdbc" % "3.5.0",
"org.scalikejdbc" %% "scalikejdbc-config" % "3.5.0",
"org.scalikejdbc" %% "scalikejdbc-play-initializer" % "2.8.0-scalikejdbc-3.5",
"org.postgresql" % "postgresql" % "9.3-1104-jdbc41",
"jakarta.mail" % "jakarta.mail-api" % "1.6.5",
"com.sun.mail" % "smtp" % "1.6.5",
"org.scalaj" %% "scalaj-http" % "2.4.2",
"com.vmunier" %% "scalajs-scripts" % "1.1.4"
) ++ Seq(
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser"
).map(_ % "0.13.0"),
scalacOptions ++= sharedScalacOptions,
scalaJSProjects := Seq(scalajs),
pipelineStages in Assets := Seq(scalaJSPipeline)
) ++ sharedDirectorySettings
lazy val sharedScalacOptions = Seq(
"-unchecked",
"-deprecation",
"-feature",
)
val sharedSrcDir = "scala"
lazy val sharedDirectorySettings = Seq(
unmanagedSourceDirectories in Compile += (ThisBuild / baseDirectory).value / sharedSrcDir / "src" / "main" / "scala",
unmanagedSourceDirectories in Test += (ThisBuild / baseDirectory).value / sharedSrcDir / "src" / "test" / "scala",
)