-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
201 lines (153 loc) · 8.06 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
193
194
195
196
import sbt.url
import scala.xml.transform.{RewriteRule, RuleTransformer}
import scala.xml.{Comment, Elem, Node => XmlNode, NodeSeq => XmlNodeSeq}
name := "sapphire-javafx"
crossScalaVersions := Seq("2.13.10", "2.12.12")
scalaVersion := crossScalaVersions.value.head
compileOrder := CompileOrder.JavaThenScala
lazy val sapphire_javafx = Project(id = "sapphire-javafx", base = file("."))
test / javacOptions += "-Dorg.apache.deltaspike.ProjectStage=Test"
scalacOptions += "-deprecation"
test / parallelExecution := false
val LogbackVersion = "1.4.5"
val DeltaspikeVersion = "1.9.5"
val IkonliVersion = "12.3.1"
addCommandAlias("run-showcase", "sapphire-javafx-showcase/run")
lazy val demo_login = Project(id = "sapphire-javafx-login", base = file("demos/login"))
.settings(
scalaVersion := "2.13.10",
name := "sapphire-javafx-login",
description := "Sapphire Login Demo",
libraryDependencies ++= Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
.map(m => "org.openjfx" % s"javafx-$m" % JavaFXVersion classifier osName),
libraryDependencies += "ch.qos.logback" % "logback-classic" % LogbackVersion,
mainClass := Some("com.sfxcode.sapphire.javafx.demo.login.Application")
)
.dependsOn(sapphire_javafx)
addCommandAlias("run-login", "sapphire-login-demo/run")
lazy val demo_issues = Project(id = "sapphire-javafx-issues", base = file("demos/issues"))
.settings(
scalaVersion := "2.13.10",
name := "sapphire-javafx-issues",
description := "Sapphire Issues Demo",
libraryDependencies ++= Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
.map(m => "org.openjfx" % s"javafx-$m" % JavaFXVersion classifier osName),
libraryDependencies += "ch.qos.logback" % "logback-classic" % LogbackVersion,
libraryDependencies += "org.scalafx" %% "scalafx" % "18.0.1-R28",
libraryDependencies += "javax.enterprise" % "cdi-api" % "2.0",
libraryDependencies += "javax.annotation" % "javax.annotation-api" % "1.3.2",
libraryDependencies += "org.apache.openwebbeans" % "openwebbeans-impl" % "2.0.22",
libraryDependencies += "org.apache.deltaspike.core" % "deltaspike-core-impl" % DeltaspikeVersion,
libraryDependencies += "org.apache.deltaspike.cdictrl" % "deltaspike-cdictrl-api" % DeltaspikeVersion,
libraryDependencies += "org.apache.deltaspike.cdictrl" % "deltaspike-cdictrl-owb" % DeltaspikeVersion,
mainClass := Some("com.sfxcode.sapphire.javafx.demo.issues.Application")
)
.dependsOn(sapphire_javafx)
addCommandAlias("run-issues", "sapphire-issues-demo/run")
lazy val tutorial = Project(id = "sapphire-javafx-tutorial", base = file("demos/tutorial"))
.settings(
scalaVersion := "2.13.10",
name := "sapphire-javafx-tutorial",
description := "Sapphire Tutorial",
libraryDependencies ++= Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
.map(m => "org.openjfx" % s"javafx-$m" % JavaFXVersion classifier osName),
libraryDependencies += "ch.qos.logback" % "logback-classic" % LogbackVersion,
mainClass := Some("com.sfxcode.sapphire.javafx.demo.tutorial.Application")
)
.dependsOn(sapphire_javafx)
lazy val windows = Project(id = "sapphire-javafx-windows", base = file("demos/windows"))
.settings(
scalaVersion := "2.13.10",
name := "sapphire-javafx-windows",
description := "Sapphire Windows",
libraryDependencies ++= Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
.map(m => "org.openjfx" % s"javafx-$m" % JavaFXVersion classifier osName),
libraryDependencies += "ch.qos.logback" % "logback-classic" % LogbackVersion,
mainClass := Some("com.sfxcode.sapphire.javafx.demo.windows.Application")
)
.dependsOn(sapphire_javafx)
lazy val showcase =
Project(id = "sapphire-javafx-showcase", base = file("showcase"))
.settings(
scalaVersion := "2.13.10",
name := "sapphire-javafx-showcase",
description := "Sapphire JavaFX Showcase",
libraryDependencies ++= Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
.map(m => "org.openjfx" % s"javafx-$m" % JavaFXVersion classifier osName),
libraryDependencies ++= Seq(
"io.circe" %% "circe-core",
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser"
).map(_ % circeVersion),
libraryDependencies += "ch.qos.logback" % "logback-classic" % LogbackVersion,
resolvers += "sandec" at "https://sandec.jfrog.io/artifactory/repo",
libraryDependencies += "com.sandec" % "mdfx" % "0.2.8",
libraryDependencies += "com.jfoenix" % "jfoenix" % "9.0.10",
libraryDependencies += "org.fxmisc.richtext" % "richtextfx" % "0.11.0",
libraryDependencies += "com.github.pathikrit" %% "better-files" % "3.9.1",
resolvers += "jasperreports-repo" at "https://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts",
libraryDependencies += "net.sf.jasperreports" % "jasperreports" % "6.20.0",
libraryDependencies += "xerces" % "xercesImpl" % "2.12.0",
mainClass := Some("com.sfxcode.sapphire.javafx.showcase.Application")
)
.dependsOn(sapphire_javafx)
lazy val sapphire_extension_scenebuilder = Project(
id = "sapphire-javafx-scenebuilder",
base = file("scenebuilder")
).settings(
name := "sapphire-javafx-scenebuilder",
description := "Sapphire JavaFX Scenebuilder",
crossPaths := false,
libraryDependencies ++= Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
.map(m => "org.openjfx" % s"javafx-$m" % JavaFXVersion classifier osName)
)
lazy val docs = (project in file("docs"))
.enablePlugins(ParadoxSitePlugin)
.enablePlugins(ParadoxMaterialThemePlugin)
.enablePlugins(GhpagesPlugin)
.settings(
scalaVersion := "2.13.8",
name := "sapphire-javafx-docs",
publish / skip := true,
ghpagesNoJekyll := true,
git.remoteRepo := "git@github.com:sfxcode/sapphire-javafx.git",
Compile / paradoxMaterialTheme ~= {
_.withRepository(uri("https://github.com/sfxcode/sapphire-javafx"))
},
(Compile / paradoxMarkdownToHtml / excludeFilter) := (Compile / paradoxMarkdownToHtml / excludeFilter).value ||
ParadoxPlugin.InDirectoryFilter((Compile / paradox / sourceDirectory).value / "includes")
)
val JavaFXVersion = "19.0.2.1"
val osName = System.getProperty("os.name") match {
case n if n.startsWith("Linux") => "linux"
case n if n.startsWith("Mac") => "mac"
case n if n.startsWith("Windows") => "win"
case _ => throw new Exception("Unknown platform!")
}
addCommandAlias("run-tutorial", "sapphire-tutorial/run")
// Test
libraryDependencies += "org.specs2" %% "specs2-core" % "4.19.2" % Test
libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test
libraryDependencies += "ch.qos.logback" % "logback-classic" % LogbackVersion % Test
val circeVersion = "0.14.3"
libraryDependencies ++= Seq(
"io.circe" %% "circe-core",
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser"
).map(_ % circeVersion % Test)
// Compile
libraryDependencies ++= Seq("base", "controls", "fxml", "graphics", "media", "swing", "web").map(m =>
"org.openjfx" % s"javafx-$m" % JavaFXVersion % Provided classifier osName
)
libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.9.0"
libraryDependencies += "com.sfxcode.sapphire" %% "sapphire-data" % "2.0.5"
libraryDependencies += "org.controlsfx" % "controlsfx" % "11.1.2" intransitive ()
libraryDependencies += "org.kordamp.ikonli" % "ikonli-javafx" % IkonliVersion
libraryDependencies += "org.kordamp.ikonli" % "ikonli-fontawesome-pack" % IkonliVersion
// extension showcase
libraryDependencies += "com.jfoenix" % "jfoenix" % "9.0.10" % Provided
libraryDependencies += "org.fxmisc.richtext" % "richtextfx" % "0.11.0" % Provided
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html"))
enablePlugins(BuildInfoPlugin)
buildInfoPackage := "com.sfxcode.sapphire.javafx"
buildInfoOptions += BuildInfoOption.BuildTime