forked from MF42-DZH/parsley-debug-frontends
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
132 lines (120 loc) · 4.91 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
val Scala213 = "2.13.14"
val Scala212 = "2.12.18"
val Scala3 = "3.3.3"
val Java11 = JavaSpec.temurin("11")
val Java17 = JavaSpec.temurin("17")
val Java21 = JavaSpec.temurin("21")
val mainBranch = "master"
val baseParsleyVersion = "5.0.0-M12"
val circeVersion = "0.14.10"
val scalatestVersion = "3.2.19"
// Here's hoping the stable version of Http4S works fine!
val http4sVersion = "0.23.30" // For Scala 2.12 compatibility, this version is needed.
val log4catsVersion = "2.6.0"
val scalaXmlVersion = "2.3.0"
val scalafxVersion = "19.0.0-R30" // Later versions unsupported by Java 8. (I don't really mind this anymore)
Global / onChangedBuildSource := ReloadOnSourceChanges
inThisBuild(List(
tlBaseVersion := "0.1",
organization := "com.github.j-mie6",
organizationName := "Parsley Debug View Contributors <https://github.com/j-mie6/parsley-debug-views/graphs/contributors>",
startYear := Some(2023), // true start is 2018, but license is from 2020
licenses := List("BSD-3-Clause" -> url("https://opensource.org/licenses/BSD-3-Clause")),
developers := List(
tlGitHubDev("j-mie6", "Jamie Willis"),
tlGitHubDev("mf42-dzh", "Fawwaz Abdullah")
),
versionScheme := Some("early-semver"),
crossScalaVersions := Seq(Scala213, Scala212, Scala3),
scalaVersion := Scala213,
// CI Configuration
tlCiReleaseBranches := Seq(mainBranch),
tlCiScalafmtCheck := false,
tlCiHeaderCheck := true,
githubWorkflowJavaVersions := Seq(Java11, Java17, Java21),
githubWorkflowConcurrency := None, // this allows us to not fail the pipeline on double commit
// Website Configuration
//tlSitePublishBranch := Some(mainBranch),
))
lazy val root = tlCrossRootProject.aggregate(remoteView, jsonInfo, sfxUi/*, http4sServer*/, unidocs)
lazy val commonSettings = Seq(
headerLicenseStyle := HeaderLicenseStyle.SpdxSyntax,
headerEmptyLine := false,
resolvers ++= Opts.resolver.sonatypeOssReleases, // Will speed up MiMA during fast back-to-back releases
resolvers ++= Opts.resolver.sonatypeOssSnapshots, // needed during flux periods
libraryDependencies ++= Seq(
"com.github.j-mie6" %%% "parsley" % baseParsleyVersion,
"com.github.j-mie6" %%% "parsley-debug" % baseParsleyVersion,
"org.scalatest" %%% "scalatest" % scalatestVersion % Test
),
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-oI"),
Test / parallelExecution := false,
)
lazy val jsonInfo = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.in(file("json-info"))
.settings(
commonSettings,
name := "parsley-debug-json",
libraryDependencies ++= Seq(
"io.circe" %%% "circe-core" % circeVersion,
"io.circe" %%% "circe-generic" % circeVersion,
"io.circe" %%% "circe-parser" % circeVersion,
)
)
// this only works for java, obviously.
lazy val sfxUi = project
.in(file("sfx-ui"))
.settings(
commonSettings,
name := "parsley-debug-sfx",
libraryDependencies += "org.scalafx" %%% "scalafx" % scalafxVersion,
)
// native is out for http4s, because it doesn't support 0.5 yet...
// a bit useless on Scala.js, except if its being ran within Node.js...
lazy val http4sServer = crossProject(JVMPlatform, JSPlatform /*, NativePlatform*/ )
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.dependsOn(jsonInfo) // We want the CJson type class here too.
.in(file("http4s-server"))
.settings(
commonSettings,
name := "parsley-debug-http",
libraryDependencies ++= Seq(
"io.circe" %%% "circe-core" % circeVersion,
"io.circe" %%% "circe-generic" % circeVersion,
"io.circe" %%% "circe-parser" % circeVersion,
"org.http4s" %%% "http4s-ember-client" % http4sVersion,
"org.http4s" %%% "http4s-ember-server" % http4sVersion,
"org.http4s" %%% "http4s-dsl" % http4sVersion,
"org.http4s" %%% "http4s-circe" % http4sVersion,
"org.typelevel" %%% "log4cats-core" % log4catsVersion,
"org.typelevel" %%% "log4cats-noop" % log4catsVersion,
"org.scala-lang.modules" %%% "scala-xml" % scalaXmlVersion,
// FIXME: find a replacement for this minifier. N.B. This is licensed under the Apache License 2.0.
"dev.i10416" %%% "cssminifier" % "0.0.3",
)
)
.jvmSettings(
libraryDependencies += "org.typelevel" %%% "log4cats-slf4j" % log4catsVersion
)
lazy val unidocs = project
.in(file("unidoc"))
.enablePlugins(TypelevelUnidocPlugin)
.settings(
name := "parsley-debug-view-docs",
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(jsonInfo.jvm, sfxUi/*, http4sServer*/),
)
lazy val remoteView = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.in(file("remote-view"))
.settings(
commonSettings,
name := "parsley-debug-remote",
libraryDependencies ++= Seq(
"com.softwaremill.sttp.client3" %% "core" % "3.10.2",
"com.lihaoyi" %% "upickle" % "4.1.0"
)
)