-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
120 lines (104 loc) · 3.88 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
Global / onChangedBuildSource := ReloadOnSourceChanges
// https://typelevel.org/sbt-typelevel/faq.html#what-is-a-base-version-anyway
ThisBuild / tlBaseVersion := "0.1" // your current series x.y
ThisBuild / organization := "io.github.mf42-dzh"
ThisBuild / organizationName := "Fawwaz Abdullah"
ThisBuild / startYear := Some(2023)
ThisBuild / licenses := Seq("BSD-3-Clause" -> url("https://opensource.org/licenses/BSD-3-Clause"))
ThisBuild / developers := List(
// your GitHub handle and name
tlGitHubDev("mf42-dzh", "Fawwaz Abdullah")
)
// publish to s01.oss.sonatype.org (set to true to publish to oss.sonatype.org instead)
ThisBuild / tlSonatypeUseLegacyHost := false
val Scala212 = "2.12.18"
val Scala213 = "2.13.12"
val Scala3 = "3.3.1"
ThisBuild / crossScalaVersions := Seq(Scala212, Scala213, Scala3)
ThisBuild / scalaVersion := Scala213 // the default Scala
// Java version for CI and support
ThisBuild / githubWorkflowJavaVersions := Seq(
JavaSpec.temurin("8"),
JavaSpec.temurin("11"),
JavaSpec.temurin("17")
)
// Shared dependencies for all frontends:
val baseParsleyVersion = "4.4-6f5b209-SNAPSHOT"
lazy val commonSettings = Seq(
headerLicenseStyle := HeaderLicenseStyle.SpdxSyntax,
headerEmptyLine := false,
resolvers ++= Opts.resolver.sonatypeOssSnapshots,
libraryDependencies ++= Seq(
"com.github.j-mie6" %%% "parsley",
"com.github.j-mie6" %%% "parsley-debug"
).map(_ % baseParsleyVersion) ++ Seq(
"org.scalactic" %%% "scalactic" % "3.2.17" % Test,
"org.scalatest" %%% "scalatest" % "3.2.17" % Test
)
)
lazy val root = tlCrossRootProject.aggregate(con_ui, json_info, sfx_ui, http_server)
lazy val con_ui = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.in(file("con-ui"))
.settings(
commonSettings,
name := "parsley-debug-console"
)
// Circe JSON library.
val circeVersion = "0.14.6"
lazy val circe = Seq(
libraryDependencies ++= Seq(
"io.circe" %%% "circe-core",
"io.circe" %%% "circe-generic",
"io.circe" %%% "circe-parser"
).map(_ % circeVersion)
)
lazy val json_info = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.in(file("json-info"))
.settings(
commonSettings,
name := "parsley-debug-json",
circe
)
lazy val sfx_ui = crossProject(JVMPlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.in(file("sfx-ui"))
.settings(
commonSettings,
name := "parsley-debug-sfx",
libraryDependencies += "org.scalafx" %%% "scalafx" % "19.0.0-R30" // Later versions unsupported by Java 8.
)
// Here's hoping the stable version of Http4S works fine!
val http4sVersion = "0.23.23" // For Scala 2.12 compatibility, this version is needed.
val log4catsVersion = "2.6.0"
lazy val http_server = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.dependsOn(json_info) // We want the CJson type class here too.
.in(file("http-server"))
.settings(
commonSettings,
name := "parsley-debug-http",
circe,
libraryDependencies ++= Seq(
"org.http4s" %%% "http4s-ember-client",
"org.http4s" %%% "http4s-ember-server",
"org.http4s" %%% "http4s-dsl",
"org.http4s" %%% "http4s-circe"
).map(_ % http4sVersion) ++ Seq(
"org.typelevel" %%% "log4cats-core",
"org.typelevel" %%% "log4cats-noop"
).map(_ % log4catsVersion) ++ Seq(
"org.scala-lang.modules" %%% "scala-xml" % "2.2.0",
// TODO: find a replacement for this minifier. N.B. This is licensed under the Apache License 2.0.
"dev.i10416" %%% "cssminifier" % "0.0.2"
)
)
.jvmSettings(
libraryDependencies += "org.typelevel" %%% "log4cats-slf4j" % log4catsVersion
)
Test / parallelExecution := false