-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbuild.sbt
80 lines (74 loc) · 2.71 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
lazy val Scala213 = "2.13.14"
lazy val supportedScalaVersions = List(Scala213)
ThisBuild / scalaVersion := Scala213
ThisBuild / organization := "io.github.kitlangton"
ThisBuild / organizationName := "kitlangton"
ThisBuild / description := "A form combinator library for decimating frontend boilerplate"
ThisBuild / homepage := Some(url("https://github.com/kitlangton/formula"))
name := "formula"
Global / onChangedBuildSource := ReloadOnSourceChanges
val sharedSettings = Seq(
licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
// semanticdbEnabled := true, // enable SemanticDB
// semanticdbVersion := scalafixSemanticdb.revision, // use Scalafix compatible version
developers := List(
Developer(
id = "kitlangton",
name = "Kit Langton",
email = "kit.langton@gmail.com",
url = url("https://github.com/kitlangton")
)
),
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n <= 12 =>
List(compilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full))
case _ =>
List()
}
},
Compile / scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n <= 12 => List("-Ypartial-unification")
case _ => List("-Ymacro-annotations", "-Ywarn-unused", "-Wmacros:after")
}
}
)
lazy val root = project
.in(file("."))
.aggregate(core, examples)
.settings(
publish / skip := true
)
lazy val core = project
.in(file("core"))
.enablePlugins(ScalaJSPlugin)
.settings(
name := "formula",
scalacOptions ++= Seq("-Ymacro-annotations"),
libraryDependencies ++= Seq(
"com.raquo" %%% "laminar" % "17.0.0",
"com.softwaremill.magnolia1_2" %%% "magnolia" % "1.1.2",
"org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided
),
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) },
scalaJSLinkerConfig ~= { _.withSourceMap(false) }
)
.settings(sharedSettings)
lazy val examples = project
.in(file("examples"))
.enablePlugins(ScalaJSPlugin)
.settings(
name := "formula-examples",
libraryDependencies ++= Seq(
"com.raquo" %%% "laminar" % "17.0.0",
"io.github.cquiroz" %%% "scala-java-time" % "2.6.0",
"io.github.cquiroz" %%% "scala-java-time-tzdb" % "2.6.0"
),
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) },
scalaJSLinkerConfig ~= { _.withSourceMap(false) },
scalaJSUseMainModuleInitializer := true,
publish / skip := true
)
.settings(sharedSettings)
.dependsOn(core)