forked from json4s/json4s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
94 lines (83 loc) · 2.72 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
import xml.Group
import com.typesafe.sbt.SbtStartScript
import Dependencies._
import build._
lazy val root = Project(
id = "json4s",
base = file("."),
settings = json4sSettings ++ noPublish
) aggregate(core, native, json4sExt, jacksonSupport, scalazExt, json4sTests, mongo, ast, scalap, examples)
lazy val ast = Project(
id = "json4s-ast",
base = file("ast"),
settings = json4sSettings ++ Seq(
buildInfoKeys := Seq[BuildInfoKey](name, organization, version, scalaVersion, sbtVersion),
buildInfoPackage := "org.json4s"
)
).enablePlugins(BuildInfoPlugin)
lazy val scalap = Project(
id = "json4s-scalap",
base = file("scalap"),
settings = json4sSettings
)
lazy val core = Project(
id = "json4s-core",
base = file("core"),
settings = json4sSettings ++ Seq(
libraryDependencies ++= Seq(paranamer) ++ scalaXml(scalaVersion.value),
initialCommands in (Test, console) := """
|import org.json4s._
|import reflect._
""".stripMargin
)
) dependsOn(ast % "compile;test->test", scalap)
lazy val native = Project(
id = "json4s-native",
base = file("native"),
settings = json4sSettings
) dependsOn(core % "compile;test->test")
lazy val json4sExt = Project(
id = "json4s-ext",
base = file("ext"),
settings = json4sSettings ++ Seq(libraryDependencies ++= jodaTime)
) dependsOn(native % "provided->compile;test->test")
lazy val jacksonSupport = Project(
id = "json4s-jackson",
base = file("jackson"),
settings = json4sSettings ++ Seq(libraryDependencies ++= jackson)
) dependsOn(core % "compile;test->test")
lazy val examples = Project(
id = "json4s-examples",
base = file("examples"),
settings = json4sSettings ++ SbtStartScript.startScriptForClassesSettings ++ noPublish
) dependsOn(
core % "compile;test->test",
native % "compile;test->test",
jacksonSupport % "compile;test->test",
json4sExt,
mongo)
lazy val scalazExt = Project(
id = "json4s-scalaz",
base = file("scalaz"),
settings = json4sSettings ++ Seq(libraryDependencies += scalaz_core)
) dependsOn(core % "compile;test->test", native % "provided->compile", jacksonSupport % "provided->compile")
lazy val mongo = Project(
id = "json4s-mongo",
base = file("mongo"),
settings = json4sSettings ++ Seq(
libraryDependencies ++= Seq(
"org.mongodb" % "mongo-java-driver" % "3.4.2"
)
)) dependsOn(core % "compile;test->test")
lazy val json4sTests = Project(
id = "json4s-tests",
base = file("tests"),
settings = json4sSettings ++ Seq(
libraryDependencies ++= (specs.value :+ mockito),
initialCommands in (Test, console) :=
"""
|import org.json4s._
|import reflect._
""".stripMargin
) ++ noPublish
) dependsOn(core, native, json4sExt, scalazExt, jacksonSupport, mongo)