-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.sbt
118 lines (105 loc) · 3.03 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
import org.scalajs.linker.interface.ModuleSplitStyle
import sbtcrossproject.CrossPlugin.autoImport.crossProject
val scala3 = "3.3.4"
inThisBuild(
List(
name := "animus",
normalizedName := "animus",
organization := "com.kitlangton",
scalaVersion := scala3,
crossScalaVersions := Seq(scala3),
organization := "io.github.kitlangton",
homepage := Some(url("https://github.com/kitlangton/animus")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Developer(
"kitlangton",
"Kit Langton",
"kit.langton@gmail.com",
url("https://github.com/kitlangton")
)
)
)
)
////////////////////////
// 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 scalacSettings =
"-unchecked" ::
"-deprecation" ::
"-feature" ::
Nil
val zioVersion = "2.1.13"
val laminarVersion = "17.2.0"
lazy val commonSettings = Seq(
scalacOptions ++= scalacSettings
)
lazy val root = project
.in(file("."))
.aggregate(
animusJS,
example
// animusJVM
)
.settings(commonSettings)
.settings(
skip / publish := true
)
lazy val animus = crossProject(JSPlatform)
.in(file("modules/core"))
.settings(
name := "animus",
commonSettings,
libraryDependencies ++= Seq(
"dev.zio" %%% "zio-test" % zioVersion % Test,
"io.github.kitlangton" %%% "quotidian" % "0.0.18"
)
)
.jsSettings(
scalaJSLinkerConfig ~= {
_.withModuleKind(ModuleKind.ESModule)
.withModuleSplitStyle(ModuleSplitStyle.SmallModulesFor(List("animus")))
},
libraryDependencies ++= Seq("com.raquo" %%% "laminar" % laminarVersion)
)
lazy val animusJS = animus.js
//lazy val animusJVM = animus.jvm
lazy val example = project
.in(file("example"))
.dependsOn(animusJS)
.settings(commonSettings)
.settings(
scalaJSUseMainModuleInitializer := true,
scalaJSLinkerConfig ~= {
_.withModuleKind(ModuleKind.ESModule)
.withModuleSplitStyle(ModuleSplitStyle.SmallModulesFor(List("example")))
},
skip / publish := true,
libraryDependencies ++= Seq(
"dev.zio" %%% "zio" % zioVersion,
"dev.zio" %%% "zio-json" % "0.7.3"
)
)
.enablePlugins(ScalaJSPlugin)