forked from 418sec/argonaut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
150 lines (128 loc) · 4.33 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
import build._
val argonaut = argonautCrossProject(
"argonaut"
, Seq(JVMPlatform, JSPlatform)
).settings(
commonSettings ++ InfoSettings.all ++ Seq[Sett](
name := "argonaut"
, (sourceGenerators in Compile) += ((sourceManaged in Compile) map Boilerplate.gen).taskValue
)
)
val argonautJVM = argonaut.jvm
val argonautJS = argonaut.js
val argonautScalaz = argonautCrossProject(
"argonaut-scalaz"
, Seq(JVMPlatform, JSPlatform)
).settings(
commonSettings ++ Seq(
name := "argonaut-scalaz"
, libraryDependencies ++= Seq(
"org.scalaz" %%% "scalaz-core" % scalazVersion
)
)
).platformsSettings(JVMPlatform, JSPlatform)(
libraryDependencies += "org.scalaz" %%% "scalaz-scalacheck-binding" % s"${scalazVersion}-scalacheck-1.14" % "test"
).dependsOn(argonaut % "compile->compile;test->test")
val argonautScalazJVM = argonautScalaz.jvm
val argonautScalazJS = argonautScalaz.js
val argonautMonocle = argonautCrossProject(
"argonaut-monocle"
, Seq(JVMPlatform, JSPlatform)
).settings(
commonSettings ++ Seq[Sett](
name := "argonaut-monocle"
, libraryDependencies ++= Seq(
"com.github.julien-truffaut" %%% "monocle-core" % monocleVersion
, "com.github.julien-truffaut" %%% "monocle-macro" % monocleVersion
, "com.github.julien-truffaut" %%% "monocle-law" % monocleVersion % "test"
)
)
).dependsOn(argonaut % "compile->compile;test->test", argonautScalaz % "compile->compile;test->test")
val argonautMonocleJVM = argonautMonocle.jvm
val argonautMonocleJS = argonautMonocle.js
val argonautCats = argonautCrossProject(
"argonaut-cats"
, Seq(JVMPlatform, JSPlatform)
).settings(
commonSettings ++ Seq(
name := "argonaut-cats"
, libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-core" % catsVersion
, "org.typelevel" %%% "cats-laws" % catsVersion % "test"
, "org.typelevel" %%% "discipline-specs2" % "1.0.0" % "test"
)
)
).dependsOn(argonaut % "compile->compile;test->test")
val argonautCatsJVM = argonautCats.jvm
val argonautCatsJS = argonautCats.js
val argonautJawn = argonautCrossProject(
"argonaut-jawn"
, Seq(JVMPlatform)
).settings(
commonSettings ++ Seq(
name := "argonaut-jawn"
, libraryDependencies ++= Seq(
"org.typelevel" %%% "jawn-parser" % "1.0.0"
)
)
).dependsOn(argonaut % "compile->compile;test->test")
val argonautJawnJVM = argonautJawn.jvm
val argonautBenchmark = Project(
id = "argonaut-benchmark"
, base = file("argonaut-benchmark")
).settings(
base ++ ReleasePlugin.projectSettings ++ PublishSettings.all ++ Seq[Sett](
name := "argonaut-benchmark"
, fork in run := true
, publishArtifact := false
, libraryDependencies ++= Seq(
"com.google.caliper" % "caliper" % "0.5-rc1"
, "com.fasterxml.jackson.core" % "jackson-core" % "2.10.3"
)
, javaOptions in run ++= ((fullClasspath in Runtime) map { cp => Seq("-cp", sbt.Attributed.data(cp).mkString(":")) }).value
)
).dependsOn(argonautJVM)
val jsProjects = Seq(
argonautJS, argonautScalazJS, argonautMonocleJS, argonautCatsJS
)
val jvmProjects = Seq(
argonautJVM, argonautScalazJVM, argonautMonocleJVM, argonautCatsJVM, argonautJawnJVM, argonautBenchmark
)
lazy val noPublish = Seq(
PgpKeys.publishSigned := {},
PgpKeys.publishLocalSigned := {},
publishLocal := {},
publishArtifact in Compile := false,
publish := {}
)
val jvmParent = project
.settings(
base
, noPublish
).aggregate(
jvmProjects.map(p => p: ProjectReference) : _*
)
val jsParent = project
.settings(
base
, noPublish
, commands += Command.command("testSequential"){
// avoid "org.scalajs.jsenv.ComJSEnv$ComClosedException: Node.js isn't connected" error in travis-ci
jsProjects.map(_.id + "/test").sorted.toList ::: _
}
).aggregate(
jsProjects.map(p => p: ProjectReference) : _*
)
val argonautParent = Project(
id = "argonaut-parent"
, base = file(".")
).settings(
base
, ReleasePlugin.projectSettings
, PublishSettings.all
, noPublish
, name := "argonaut-parent"
, fork in run := true
).aggregate(
(jsProjects ++ jvmProjects).map(p => p: ProjectReference) : _*
)