-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.sbt
99 lines (90 loc) · 2.9 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
inThisBuild(
List(
name := "quotidian",
normalizedName := "quotidian",
organization := "io.github.kitlangton",
scalaVersion := "3.3.4",
homepage := Some(url("https://github.com/kitlangton/quotidian")),
licenses := List("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Developer("kitlangton", "Kit Langton", "kit.langton@gmail.com", url("https://github.com/kitlangton"))
),
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
)
)
Global / onChangedBuildSource := ReloadOnSourceChanges
////////////////////////
// sbt-github-actions //
////////////////////////
ThisBuild / githubWorkflowJavaVersions += JavaSpec.temurin("17")
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches :=
Seq(
RefPredicate.StartsWith(Ref.Tag("v")),
RefPredicate.Equals(Ref.Branch("main"))
)
ThisBuild / githubWorkflowPublish := Seq(
WorkflowStep.Sbt(
commands = List("ci-release"),
name = Some("Publish project"),
env = Map(
"PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}",
"PGP_SECRET" -> "${{ secrets.PGP_SECRET }}",
"SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}",
"SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}"
)
)
)
/////////////////////////
// Project Definitions //
/////////////////////////
lazy val root = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.in(file("."))
.settings(
name := "root",
publish / skip := true
)
.aggregate(
core,
examples
)
lazy val core =
(crossProject(JSPlatform, JVMPlatform, NativePlatform).crossType(CrossType.Pure) in file("modules/core"))
.settings(
name := "quotidian",
libraryDependencies ++= Seq(
"dev.zio" %% "zio-test" % "2.1.9" % Test,
"dev.zio" %% "zio-test-sbt" % "2.1.9" % Test,
"com.lihaoyi" %% "pprint" % "0.9.0"
),
scalacOptions ++= Seq(
"-deprecation",
"-Xcheck-macros"
// "-Wunused:all"
)
)
.jsSettings(
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) }
)
lazy val examples = (crossProject(JVMPlatform).crossType(CrossType.Pure) in file("examples"))
.settings(
name := "quotidian-examples",
publish / skip := true,
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % "2.1.9",
"dev.zio" %% "zio-test" % "2.1.9" % Test,
"dev.zio" %% "zio-test-sbt" % "2.1.9" % Test
),
scalacOptions ++= Seq(
"-deprecation",
"-Xcheck-macros"
)
)
// .jsSettings(
// scalaJSUseMainModuleInitializer := true,
// scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) }
// )
.dependsOn(core)
// .enablePlugins(ScalaJSPlugin)
addCommandAlias("prepare", "scalafmtAll;scalafixAll;githubWorkflowGenerate")