-
Notifications
You must be signed in to change notification settings - Fork 73
/
build.sbt
78 lines (71 loc) · 2.46 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
ThisBuild / tlBaseVersion := "1.6"
lazy val scala212 = "2.12.20"
lazy val scala213 = "2.13.15"
lazy val scala3 = "3.3.4"
ThisBuild / crossScalaVersions := Seq(scala3, scala213, scala212)
ThisBuild / tlVersionIntroduced := Map("3" -> "1.1.2")
ThisBuild / startYear := Some(2012)
ThisBuild / licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT"))
ThisBuild / developers += Developer(
name = "Erik Osheim",
email = "[email protected]",
id = "d_m",
url = url("http://github.com/non/")
)
ThisBuild / tlFatalWarnings := false
lazy val jawnSettings = Seq(
Test / testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-verbosity", "1"),
libraryDependencies += "org.scalacheck" %%% "scalacheck" % "1.18.1" % Test
)
lazy val jawnSettingsJVM = List(Test / fork := true)
lazy val jawnSettingsJS = List(
tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "1.2.0").toMap
)
lazy val jawnSettingsNative = Seq(
tlVersionIntroduced := Map(
"2.12" -> "1.6.0",
"2.13" -> "1.6.0",
"3" -> "1.6.0"
)
)
lazy val root = tlCrossRootProject
.aggregate(parser, util, ast, benchmark)
.settings(
name := "jawn-root"
)
lazy val parser = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Full)
.in(file("parser"))
.settings(name := "parser")
.settings(moduleName := "jawn-parser")
.settings(jawnSettings: _*)
.jvmSettings(jawnSettingsJVM: _*)
.jsSettings(jawnSettingsJS: _*)
.nativeSettings(jawnSettingsNative: _*)
lazy val util = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Full)
.in(file("util"))
.dependsOn(parser % "compile->compile;test->test")
.settings(name := "util")
.settings(moduleName := "jawn-util")
.settings(jawnSettings: _*)
.jvmSettings(jawnSettingsJVM: _*)
.jsSettings(jawnSettingsJS: _*)
.nativeSettings(jawnSettingsNative: _*)
lazy val ast = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Full)
.in(file("ast"))
.dependsOn(parser % "compile->compile;test->test")
.dependsOn(util % "compile->compile;test->test")
.settings(name := "ast")
.settings(moduleName := "jawn-ast")
.settings(jawnSettings: _*)
.jvmSettings(jawnSettingsJVM: _*)
.jsSettings(jawnSettingsJS: _*)
.nativeSettings(jawnSettingsNative: _*)
lazy val benchmark = project
.in(file("benchmark"))
.dependsOn(parser.jvm, util.jvm, ast.jvm)
.settings(name := "jawn-benchmark")
.settings(jawnSettings: _*)
.enablePlugins(NoPublishPlugin, JmhPlugin)