-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
51 lines (46 loc) · 1.4 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
ThisBuild / scalaVersion := "2.13.11"
val shared =
crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.settings(
libraryDependencies ++= Seq(
"org.endpoints4s" %%% "algebra" % "1.0.0",
"org.endpoints4s" %%% "json-schema-generic" % "1.0.0",
)
)
.jvmSettings(
libraryDependencies += "org.scala-js" %% "scalajs-stubs" % "1.0.0" % "provided",
)
.jsSettings(
// the shared project contains classes (i.e. Counter and Increment) that are referenced in the exported API of the client project
// -> semantic db information is required for these classes
// -> configure the semanticdb compiler plugin
ScalaTsPlugin.crossProject.jsSettings
)
val sharedJS = shared.js
val sharedJVM = shared.jvm
val client =
project
.enablePlugins(ScalaTsPlugin)
.settings(
scalaTsModuleName := "scala-client",
scalaTsConsiderFullCompileClassPath := true,
libraryDependencies += "org.endpoints4s" %%% "xhr-client" % "1.0.0+sjs1",
)
.dependsOn(sharedJS)
val server =
project
.settings(
libraryDependencies ++= Seq(
"org.endpoints4s" %% "akka-http-server" % "1.0.0",
)
)
.dependsOn(sharedJVM)
lazy val root = project
.in(file("."))
.aggregate(client, server, sharedJS, sharedJVM)
.settings(
name := "scala-ts-angular",
publish := {},
publishLocal := {},
)