-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
64 lines (59 loc) · 1.74 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
// voir http://www.wartremover.org/
lazy val warts = {
import Wart._
Warts.allBut(Recursion, StringPlusAny, Nothing, Any)
}
lazy val globalSettings: Seq[sbt.Def.SettingsDefinition] =
Seq(
inThisBuild(
List(
organization := "com.github.chrilves",
scalaVersion := "3.5.0",
version := "0.1.0-SNAPSHOT"
)),
updateOptions := updateOptions.value.withCachedResolution(true),
scalacOptions -= "-Ykind-projector",
scalacOptions ++= Seq("-deprecation", "-Xkind-projector"),
Compile/compile/wartremoverErrors := warts,
Compile/console/wartremoverErrors := warts,
scalafmtOnCompile := true,
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-core" % "2.12.0",
"org.scalatest" %%% "scalatest" % "3.2.19" % Test
)
//, scalaJSUseMainModuleInitializer := true
)
lazy val core =
crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.in(file("core"))
.settings(globalSettings : _*)
.settings(name := "core")
.jsSettings(scalacOptions += "-scalajs")
lazy val coreJS = core.js
lazy val coreJVM = core.jvm
lazy val prime =
project
.in(file("prime"))
.settings(globalSettings : _*)
.settings(
name := "prime",
maintainer := "[email protected]"
)
.enablePlugins(JavaAppPackaging)
.dependsOn(coreJVM)
lazy val web =
project
.in(file("web"))
.enablePlugins(ScalaJSPlugin)
.settings(globalSettings : _*)
.settings(
name := "prime-web",
scalacOptions += "-scalajs",
libraryDependencies ++= Seq(
"chrilves" %%% "typed-web" % "0.1.0-SNAPSHOT",
"org.scala-js" %%% "scalajs-dom" % "2.8.0"
),
scalaJSUseMainModuleInitializer := true
)
.dependsOn(coreJS)