-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
81 lines (68 loc) · 2.86 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
import org.typelevel.scalacoptions.ScalacOptions
Global / onChangedBuildSource := ReloadOnSourceChanges
Global / excludeLintKeys ++= Set(ThisBuild / pomIncludeRepository, unstructured4s / paradox / sourceDirectory)
ThisBuild / scalaVersion := "3.3.3"
ThisBuild / mimaFailOnNoPrevious := false
ThisBuild / envFileName := ".envrc"
lazy val commonSettings = Seq(
Test / tpolecatExcludeOptions += ScalacOptions.warnNonUnitStatement
)
lazy val noPublishSettings = Seq(
publish / skip := true,
publishArtifact := false
)
lazy val exampleApps = Seq(
"org.twelvehart.unstructured4s.examples.ZIOApp",
"org.twelvehart.unstructured4s.examples.CatsEffectApp",
"org.twelvehart.unstructured4s.examples.BasicApp"
)
lazy val runExamples = exampleApps.map(app => s"examples/runMain $app").mkString(";")
addCommandAlias("runExamples", runExamples)
addCommandAlias("prepare", "scalafmtAll;test")
addCommandAlias("fullPrep", "clean;prepare;runExamples")
addCommandAlias("pushSite", ";project unstructured4s;ghPagesCacheClear;ghpagesPushSite")
lazy val unstructured4s = (project in file("."))
.enablePlugins(ParadoxSitePlugin, SitePreviewPlugin, ParadoxMaterialThemePlugin, SiteScaladocPlugin, GhpagesPlugin)
.settings(
commonSettings,
CustomTasks.settings,
noPublishSettings,
Compile / paradoxMaterialTheme :=
ParadoxMaterialTheme()
.withColor("blue-grey", "orange")
.withRepository(uri("https://github.com/ASRagab/unstructured4s"))
.withFont("Overpass", "Overpass Mono")
.withSocial(
uri("https://twitter.com/PersistentCooki"),
uri("https://bsky.app/profile/traversable.bsky.social"),
uri("https://fosstodon.org/@traversable")
),
Compile / paradoxProperties ++= Map(
"snip.core.base_dir" -> ((ThisBuild / baseDirectory).value / "core").getAbsolutePath,
"sttp.version" -> V.sttp,
"zio_cats.version" -> V.zioCats
),
paradox / sourceDirectory := sourceDirectory.value / "paradox",
git.remoteRepo := scmInfo.value.get.connection.replace("scm:git:", ""),
Test / tpolecatExcludeOptions += ScalacOptions.warnNonUnitStatement,
ghpagesCleanSite / excludeFilter :=
new FileFilter {
def accept(f: File) = (ghpagesRepository.value / "CNAME").getCanonicalPath == f.getCanonicalPath
} || "versions.html"
)
.aggregate(core, examples)
lazy val core = (project in file("core"))
.settings(
commonSettings,
name := "unstructured4s-core",
libraryDependencies ++= Dependencies.core,
mimaPreviousArtifacts := previousStableVersion.value.map(organization.value %% name.value % _).toSet
)
lazy val examples = (project in file("examples"))
.dependsOn(core)
.settings(
commonSettings,
name := "unstructured4s-examples",
noPublishSettings,
libraryDependencies ++= Dependencies.examples
)