forked from swoogles/zio-ecosystem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
77 lines (63 loc) · 2.77 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
enablePlugins(JavaAppPackaging)
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / scalaVersion := "3.1.0"
lazy val sharedSettings = Seq(
libraryDependencies ++= Seq(
"dev.zio" %%% "zio" % "2.0.0-RC1",
"dev.zio" %%% "zio-test" % "2.0.0-RC1" % "test",
"dev.zio" %%% "zio-test-sbt" % "2.0.0-RC1" % "test",
"com.lihaoyi" %%% "pprint" % "0.7.0",
"com.lihaoyi" %%% "upickle" % "1.4.3",
("org.scala-graph" %%% "graph-core" % "1.13.3").cross(CrossVersion.for3Use2_13),
),
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
)
mainClass in Compile := Some("org.ziverge.DependencyServer")
name := "ZioEcosystemTracker"
idePackagePrefix := Some("org.ziverge")
libraryDependencies ++= Seq(
"io.d11" %% "zhttp" % "2.0.0-RC1",
"com.lihaoyi" %%% "pprint" % "0.7.0",
"com.lihaoyi" %%% "upickle" % "1.4.3",
("com.flowtick" %%% "xmls" % "0.1.11").cross(CrossVersion.for3Use2_13),
("com.softwaremill.sttp.client3" %%% "core" % "3.3.18"),
"dev.zio" %%% "zio" % "2.0.0-RC1", // Upgrade once zhttp is migrated to ZIO 2
)
dependsOn(shared)
lazy val scalaJsExplorer = (project in file("scalaJsExplorer"))
.enablePlugins(ScalaJSPlugin)
.settings(
name := "ZioEcosystemTracker",
idePackagePrefix := Some("org.ziverge"),
libraryDependencies ++= Seq(
"com.raquo" %%% "laminar" % "0.14.2",
"com.raquo" %%% "waypoint" % "0.5.0",
),
scalaJSUseMainModuleInitializer := true,
).settings(sharedSettings).dependsOn(shared)
lazy val shared = (project in file("shared"))
.enablePlugins(ScalaJSPlugin)
.settings(
libraryDependencies ++= Seq(
"com.softwaremill.sttp.client3" %%% "core" % "3.3.18",
),
sharedSettings
)
import scala.sys.process._
lazy val fastOptJSCopyToServer = taskKey[Unit]("Build JS application and then copy to Server static resources directory")
fastOptJSCopyToServer := {
(scalaJsExplorer/Compile/fastOptJS).value
println("doing stuff")
Process("cp ./scalaJsExplorer/target/scala-3.1.0/zioecosystemtracker-fastopt.js ./src/main/resources/compiledJavascript/zioecosystemtracker-fastopt.js")!
}
lazy val fastLinkJSCopyToServer = taskKey[Unit]("Build JS application and then copy to Server static resources directory")
fastLinkJSCopyToServer := {
(scalaJsExplorer/Compile/fastLinkJS).value
Process("cp ./scalaJsExplorer/target/scala-3.1.0/zioecosystemtracker-fastopt.js ./src/main/resources/compiledJavascript/zioecosystemtracker-fastopt.js")!
}
lazy val fullOptJSCopyToServer = taskKey[Unit]("Compile and copy JS app")
fullOptJSCopyToServer := {
(scalaJsExplorer/Compile/fullOptJS).value
Process("cp ./scalaJsExplorer/target/scala-3.1.0/zioecosystemtracker-opt/main.js ./src/main/resources/compiledJavascript/zioecosystemtracker-fastopt.js")!
}