forked from typelevel/squants
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
49 lines (44 loc) · 1.48 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
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
lazy val defaultSettings =
Project.defaultSettings ++
Compiler.defaultSettings ++
Publish.defaultSettings ++
Formatting.defaultSettings ++
Console.defaultSettings ++
Docs.defaultSettings
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / turbo := true
lazy val squants =
crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Full)
.in(file("."))
.settings(defaultSettings: _*)
.jvmConfigure(
_.enablePlugins(TutPlugin, SbtOsgi)
)
.jvmSettings(
osgiSettings,
scalacOptions in Tut --= Seq("-Ywarn-unused-import", "-Ywarn-unused:imports"),
tutTargetDirectory := file("."),
tutSourceDirectory := file("shared") / "src" / "main" / "tut"
)
.jvmSettings(Tests.defaultSettings: _*)
.jsSettings(Tests.defaultSettings: _*)
.jsSettings(
parallelExecution in Test := false,
excludeFilter in Test := "*Serializer.scala" || "*SerializerSpec.scala",
scalacOptions in Tut --= Seq("-Ywarn-unused-import", "-Ywarn-unused:imports"),
sources in (Compile, test) := List() // This is a pity but we can't reliable compile on 1.0.0-M8
)
.nativeSettings(
sources in (Compile, doc) := List() // Can't build docs in native
)
lazy val root = project.in(file("."))
.settings(defaultSettings: _*)
.settings(
name := "squants",
publish := {},
publishLocal := {},
useGpg := true
)
.aggregate(squants.jvm, squants.js, squants.native)