-
Notifications
You must be signed in to change notification settings - Fork 28
/
build.sbt
192 lines (159 loc) · 5.69 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
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
import org.scalajs.linker.interface.ESVersion
name := "youi"
ThisBuild / organization := "io.youi"
ThisBuild / version := "1.0.0-SNAPSHOT"
ThisBuild / scalaVersion := "2.13.14"
ThisBuild / crossScalaVersions := List("2.13.14")
ThisBuild / scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature")
ThisBuild / publishTo := sonatypePublishToBundle.value
ThisBuild / sonatypeProfileName := "io.youi"
ThisBuild / licenses := Seq("MIT" -> url("https://github.com/outr/youi/blob/master/LICENSE"))
ThisBuild / sonatypeProjectHosting := Some(xerial.sbt.Sonatype.GitHubHosting("outr", "youi", "[email protected]"))
ThisBuild / homepage := Some(url("https://github.com/outr/youi"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/outr/youi"),
"scm:[email protected]:outr/youi.git"
)
)
ThisBuild / developers := List(
Developer(id="darkfrog", name="Matt Hicks", email="[email protected]", url=url("https://matthicks.com"))
)
ThisBuild / versionScheme := Some("semver-spec")
val spiceVersion: String = "0.5.11"
val fabricVersion: String = "1.14.5"
val profigVersion: String = "3.4.14"
val scribeVersion: String = "3.13.5"
val reactifyVersion: String = "4.1.1"
val hasherVersion: String = "1.2.3"
val openTypeVersion: String = "1.1.0"
val webFontLoaderVersion: String = "1.6.28_2"
val canvgVersion: String = "1.4.0_3"
val scalaJSDOMVersion: String = "2.8.0"
val closureCompilerVersion: String = "v20240317"
val catsVersion: String = "3.5.4"
val fs2Version: String = "3.10.2"
val scalaTestVersion: String = "3.2.19"
val catsEffectTestVersion: String = "1.5.0"
ThisBuild / evictionErrorLevel := Level.Info
lazy val root = project.in(file("."))
.aggregate(
coreJS, coreJVM, spatialJS, spatialJVM, dom, gui, capacitor, optimizer,
example, exampleServer
)
.settings(
publish := {},
publishLocal := {}
)
lazy val core = crossProject(JSPlatform, JVMPlatform).in(file("core"))
.settings(
name := "youi-core",
description := "Core functionality leveraged and shared by most other sub-projects of YouI.",
libraryDependencies ++= Seq(
"com.outr" %%% "spice-core" % spiceVersion,
"org.typelevel" %%% "fabric-io" % fabricVersion,
"com.outr" %%% "profig" % profigVersion,
"com.outr" %%% "scribe" % scribeVersion,
"com.outr" %%% "reactify" % reactifyVersion,
"org.typelevel" %%% "cats-effect" % catsVersion,
"co.fs2" %% "fs2-core" % fs2Version,
"org.scalatest" %%% "scalatest" % scalaTestVersion % Test,
"org.typelevel" %%% "cats-effect-testing-scalatest" % catsEffectTestVersion % Test
)
)
.jsSettings(
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % scalaJSDOMVersion
)
)
lazy val coreJS = core.js
lazy val coreJVM = core.jvm
lazy val spatial = crossProject(JSPlatform, JVMPlatform).in(file("spatial"))
.settings(
name := "youi-spatial",
libraryDependencies ++= Seq(
"org.scalatest" %%% "scalatest" % scalaTestVersion % Test,
"org.typelevel" %%% "cats-effect-testing-scalatest" % catsEffectTestVersion % Test
)
)
.dependsOn(core)
lazy val spatialJS = spatial.js
lazy val spatialJVM = spatial.jvm
lazy val dom = project.in(file("dom"))
.enablePlugins(ScalaJSPlugin)
.settings(
name := "youi-dom",
libraryDependencies ++= Seq(
"com.outr" %%% "profig" % profigVersion,
"com.outr" %% "spice-delta" % spiceVersion,
"org.scalatest" %%% "scalatest" % scalaTestVersion % Test,
"org.typelevel" %%% "cats-effect-testing-scalatest" % catsEffectTestVersion % Test
),
test := {}, // TODO: figure out why this no longer works
jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv()
)
.dependsOn(coreJS)
lazy val gui = project.in(file("gui"))
.enablePlugins(ScalaJSPlugin)
.enablePlugins(JSDependenciesPlugin)
.settings(
name := "youi-gui",
// jsDependencies += ProvidedJS / "webfontloader.js",
// jsDependencies += ProvidedJS / "opentype.min.js",
// jsDependencies += ProvidedJS / "opentype.min.map",
packageJSDependencies / skip := false
)
.dependsOn(dom, spatialJS)
lazy val capacitor = project.in(file("capacitor"))
.enablePlugins(ScalaJSPlugin)
.settings(
name := "youi-capacitor"
)
lazy val optimizer = project.in(file("optimizer"))
.settings(
name := "youi-optimizer",
description := "Provides optimization functionality for application development.",
fork := true,
libraryDependencies ++= Seq(
"com.google.javascript" % "closure-compiler" % closureCompilerVersion,
"com.outr" %% "scribe" % scribeVersion,
"com.outr" %% "spice-delta" % spiceVersion,
"com.outr" %% "hasher" % hasherVersion
)
)
lazy val example = project.in(file("example"))
.enablePlugins(ScalaJSPlugin)
.settings(
name := "youi-example",
scalaJSUseMainModuleInitializer := true,
packageJSDependencies / skip := false,
scalaJSLinkerConfig ~= { _.withESFeatures(_.withESVersion(ESVersion.ES2018)) }
)
.dependsOn(gui)
lazy val exampleServer = project.in(file("example/server"))
.settings(
name := "youi-example-server",
libraryDependencies ++= Seq(
"com.outr" %% "spice-server-undertow" % spiceVersion
)
)
/*
lazy val example = crossApplication.in(file("example"))
.settings(
name := "youi-example",
youiVersion := version.value,
libraryDependencies += "com.outr" %%% "scribe" % scribeVersion,
jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv()
)
lazy val exampleJS = example.js.dependsOn(gui)
lazy val exampleJVM = example.jvm
lazy val utilities = project.in(file("utilities"))
.settings(
name := "youi-utilities",
fork := true,
libraryDependencies ++= Seq(
"org.jsoup" % "jsoup" % jSoupVersion
)
)
.dependsOn(coreJVM)
*/