-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
181 lines (148 loc) · 7.16 KB
/
build.sbt
File metadata and controls
181 lines (148 loc) · 7.16 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name := "ppse"
val breezeVersion = "2.1.0"
val circeVersion = "0.14.14"
val Scala3Version = "3.7.0"
val laminarVersion = "15.0.1"
val scalajsDomVersion = "2.0.0"
val endpoints4SVersion = "1.9.0"
val endpointCirceVersion = "2.3.0"
val betterFilesVersion = "3.9.2"
ThisBuild / organization := "org.openmole"
ThisBuild / version := "1.0-SNAPSHOT"
ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("snapshots")
ThisBuild / resolvers += Resolver.mavenLocal
def excludeConflicting = Seq(
excludeDependencies += ExclusionRule(organization = "org.typelevel", name = "cats-kernel_2.13"),
excludeDependencies += ExclusionRule(organization = "org.scala-lang.modules", name ="scala-collection-compat_2.13")
)
lazy val ppse = project.in(file("ppse")).settings (
scalaVersion := Scala3Version,
resolvers += "jitpack" at "https://jitpack.io",
libraryDependencies += "org.apache.commons" % "commons-math3" % "3.6.1",
libraryDependencies += "com.github.pathikrit" %% "better-files" % betterFilesVersion,
libraryDependencies += "org.openmole" %% "mgo" % "3.66",
libraryDependencies += "com.github.scopt" %% "scopt" % "4.1.0",
libraryDependencies += "com.github.haifengl" % "smile-core" % "4.4.0",
//libraryDependencies += "com.edwardraff" % "JSAT" % "0.0.9",
libraryDependencies += "com.github.openmole" % "JSAT" % "52daf354b728051f22bdb429ca77f561f9791872",
//libraryDependencies += "com.edwardraff" % "JSAT" % "0.1.0-SNAPSHOT",// from baseDirectory.value / "lib" / "JSAT-0.1.0-SNAPSHOT.jar",
libraryDependencies += "com.outr" %% "scribe" % "3.17.0",
libraryDependencies ++= Seq(
"org.scalanlp" %% "breeze" % breezeVersion,
"org.scalanlp" %% "breeze-natives" % breezeVersion
),
libraryDependencies += "org.locationtech.jts" % "jts-core" % "1.20.0",
libraryDependencies += "org.plotly-scala" %% "plotly-render" % "0.8.5" cross CrossVersion.for3Use2_13,
libraryDependencies += "org.slf4j" % "slf4j-simple" % "2.0.17",
scalacOptions ++= Seq("-Ymacro-annotations", "-language:postfixOps"),
libraryDependencies ++= Seq(
"io.circe" %% "circe-core",
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser"
).map(_ % circeVersion),
excludeConflicting
)
lazy val flocking = Project("flocking-model", file("flocking-model")).settings(
scalaVersion := Scala3Version,
excludeConflicting
) dependsOn ppse
lazy val traffic = Project("traffic-model", file("traffic-model")).settings(
scalaVersion := Scala3Version,
excludeConflicting
) dependsOn ppse
lazy val visu = project.in(file("visu")).enablePlugins(ScalaJSPlugin).settings (
scalaVersion := Scala3Version,
libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "2.2.0",
//scalaJSUseMainModuleInitializer := true,
libraryDependencies ++= Seq(
"io.circe" %% "circe-core",
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser"
).map(_ % circeVersion),
// libraryDependencies += "org.plotly-scala" %% "plotly-render" % "0.8.4",
// libraryDependencies += "com.github.pathikrit" %% "better-files" % "3.9.1"
)
lazy val ppsePaper = Project("ppse-paper", file("ppse-paper")).settings (
version := "1.0-SNAPSHOT",
scalaVersion := Scala3Version,
resolvers += "jitpack" at "https://jitpack.io",
libraryDependencies += "org.apache.commons" % "commons-math3" % "3.6.1",
libraryDependencies += "com.github.haifengl" % "smile-core" % "4.4.0",
libraryDependencies += "com.github.openmole" % "JSAT" % "52daf354b728051f22bdb429ca77f561f9791872",
//libraryDependencies += "com.edwardraff" % "JSAT" % "0.0.9",
//libraryDependencies += "com.edwardraff" % "JSAT" % "0.1.0-SNAPSHOT",// from baseDirectory.value / "lib" / "JSAT-0.1.0-SNAPSHOT.jar",
libraryDependencies += "com.github.pathikrit" %% "better-files" % betterFilesVersion,
libraryDependencies += "ch.epfl.lamp" %% "gears" % "0.2.0",
libraryDependencies += "org.openmole" %% "mgo" % "3.66",
excludeConflicting
)
lazy val ppseCategorial = Project("ppse-categorial", file("ppse-categorial")).settings (
version := "1.0-SNAPSHOT",
scalaVersion := Scala3Version,
excludeConflicting
) dependsOn(ppsePaper)
lazy val plotPaper = Project("plot-paper", file("plot-paper")).settings (
version := "1.0-SNAPSHOT",
scalaVersion := Scala3Version,
libraryDependencies += "org.apache.commons" % "commons-math3" % "3.6.1",
libraryDependencies += "com.github.pathikrit" %% "better-files" % betterFilesVersion,
libraryDependencies += "org.plotly-scala" %% "plotly-render" % "0.8.5" cross CrossVersion.for3Use2_13,
excludeConflicting
)
//resolvers += Resolver.sonatypeRepo("snapshots")
//Global / resolvers += Resolver.sonatypeRepo("staging")
lazy val shared = project.in(file("visu/shared")) settings (
scalaVersion := Scala3Version,
libraryDependencies ++= Seq(
"org.endpoints4s" %%% "algebra" % endpoints4SVersion,
"org.endpoints4s" %%% "json-schema-circe" % endpointCirceVersion,
"io.circe" %% "circe-generic" % circeVersion)
) enablePlugins ScalaJSPlugin
lazy val client = project.in(file("visu/client")) enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin, ScalablyTypedConverterPlugin) settings(
scalaVersion := Scala3Version,
scalaJSUseMainModuleInitializer := false,
webpackBundlingMode := BundlingMode.LibraryAndApplication(),
webpackNodeArgs := Seq("--openssl-legacy-provider"),
libraryDependencies ++= Seq(
"com.raquo" %%% "laminar" % laminarVersion,
// "org.openmole.scaladget" %%% "tools" % scaladgetVersion,
// "org.openmole.scaladget" %%% "svg" % scaladgetVersion,
// "org.openmole.scaladget" %%% "bootstrapnative" % scaladgetVersion,
"org.scala-js" %%% "scalajs-dom" % scalajsDomVersion,
"org.openmole.endpoints4s" %%% "xhr-client" % "5.1.0+n"
),
Compile / npmDependencies ++= Seq(
"fabric" -> "5.3.0",
"@types/fabric" -> "5.3.0",
"@svgdotjs/svg.js" -> "3.2.0",
//"@svgdotjs/svg.panzoom.js" -> "2.1.2"
"@panzoom/panzoom" -> "4.5.1"
//"bootstrap.native" -> "5.0.7"
),
) dependsOn shared
lazy val server = project.in(file("visu/server")) settings(
scalaVersion := Scala3Version,
libraryDependencies ++= Seq(
// "com.lihaoyi" %% "scalatags" % scalatagsVersion,
"org.endpoints4s" %% "http4s-server" % "11.0.1",
"org.http4s" %% "http4s-blaze-server" % "0.23.17",
"io.circe" %% "circe-parser" % circeVersion,
// "com.raquo" %%% "laminar" % laminarVersion
// "org.endpoints4s" %% "akka-http-server" % "6.1.0+n",
// "com.typesafe.akka" %% "akka-stream" % "2.6.18" //cross CrossVersion.for3Use2_13
),
Compile / compile := {
val jsBuild = (client / Compile / fullOptJS / webpack).value.head.data
val demoTarget = target.value
val demoResource = (client / Compile / resourceDirectory).value
IO.copyFile(jsBuild, demoTarget / "webapp/js/demo.js")
IO.copyFile((client / crossTarget).value / "scalajs-bundler/main/client-opt-bundle.js.map", demoTarget / "webapp/js/client-opt-bundle.js.map")
IO.copyDirectory(demoResource, demoTarget)
IO.copyDirectory((client / crossTarget).value / "scalajs-bundler/main/node_modules", demoTarget / "webapp/js/node_modules")
(Compile / compile).value
},
run := Def.taskDyn {
(Compile / run).toTask(" " + ((Compile / target).value.getParentFile / "data"))
}.value,
excludeConflicting
) dependsOn (shared, ppse)