-
Notifications
You must be signed in to change notification settings - Fork 9
/
sbtcommunity.dbuild
340 lines (306 loc) · 12.9 KB
/
sbtcommunity.dbuild
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
vars: {
scala212-bin-version: "2.12"
scala212-version: ${vars.scala212-bin-version}".10"
scala212-xml-version: "1.0.6"
scala212-par-comb-version: "1.0.7"
// We test these branches/commits.
// All projects are built independently
sbtVersion: "develop"
zincVersion: "develop"
ioVersion: "develop"
utilVersion: "develop"
librarymanagementVersion: "develop"
sbtbintray: "master"
sbtBuilderVersion: ${FRESHSBTVERSION}
versionSuffix: "%commit%"
base: {}
default-commands: []
sbt-1-version: ${FRESHSBTVERSION}
}
vars.base.deps.inject: [] // ["com.lightbend#cloc-plugin"]
vars.uris: {
akka-stuff-uri: "https://github.com/akka/akka.git"
akka-http-uri: "https://github.com/akka/akka-http.git" // #bc849bb03" # was master
scalariform-uri: "https://github.com/scala-ide/scalariform.git"
breeze-uri: "https://github.com/SethTisue/breeze.git#sbt-api-mappings-version-bump" # was scalanlp, master
lightbend-emoji-uri: "https://github.com/lightbend/lightbend-emoji.git"
cats-effect-uri: "https://github.com/typelevel/cats-effect.git#v1.1.0" // #v0.10" # was master
cats-uri: "https://github.com/typelevel/cats.git#v1.5.0" // #master"
scalalib-uri: "https://github.com/ornicar/scalalib.git"
scalachess-uri: "https://github.com/ornicar/scalachess.git" // #a1c8abe1e0" # was master
json4s-uri: "https://github.com/json4s/json4s.git#3.5"
akka-http-cors-uri: "https://github.com/lomigmegard/akka-http-cors.git"
akka-http-session-uri: "https://github.com/softwaremill/akka-http-session.git"
circe-uri: "https://github.com/circe/circe.git"
circe-config-uri: "https://github.com/circe/circe-config.git"
scalaz-uri: "https://github.com/scalaz/scalaz.git#series/7.3.x"
twitter-util-uri: "https://github.com/twitter/util.git#ce41d10ef2cd72d25" // #develop"
scalacheck-uri: "https://github.com/rickynils/scalacheck.git"
// must be moved back to coursier/coursier master once
// https://github.com/coursier/coursier/pull/738 is updated to 1.1.1
coursier-uri: "https://github.com/coursier/coursier.git#dbaf748fada"
elastic4s-uri: "https://github.com/sksamuel/elastic4s.git#release/5.4.x" // #master"
swoval-uri: "https://github.com/swoval/swoval.git"
}
vars.default-commands += """
set commands ++= {
def alterScalacOptions(s: State, fn: Seq[String] => Seq[String]): State = {
val extracted = Project extract s
import extracted._
val r = Project.relation(extracted.structure, true)
val allDefs = r._1s.toSeq
val scopes = allDefs.filter(_.key == scalacOptions.key).map(_.scope).distinct
val redefined = scopes.map(scope => scalacOptions in scope ~= fn)
val session = extracted.session.appendRaw(redefined)
BuiltinCommands.reapply(session, structure, s)
}
def appendScalacOptions(s: State, args: Seq[String]) = {
def appendDistinct[A](x: Seq[A], y: Seq[A]) =
x.filterNot(y.contains) ++ y
alterScalacOptions(s, appendDistinct(_, args))
}
def removeScalacOptions(s: State, args: Seq[String]) =
alterScalacOptions(s, _.filterNot(args.contains))
Seq(
Command.args("appendScalacOptions", "<option>")(appendScalacOptions),
Command.args("removeScalacOptions", "<option>")(removeScalacOptions))
}
"""
include file("sbt.conf")
build: {
check-missing: [ false, false ]
cross-version: [ standard, standard ]
space.from: default
space.to: ""
extraction-version: ${vars.scala212-version}
sbt-java-options: [ "-Dsbt.gigahorse=false", "-Dsbt.build.fatal=false", "-XX:ReservedCodeCacheSize=480M" ]
sbt-version: ${vars.sbt-1-version}
projects: [
${vars.sbt} { name: sbt }
${vars.io} { name: sbt-io }
${vars.util} { name: sbt-util }
${vars.lib} { name: sbt-librarymanagement }
${vars.zinc} { name: sbt-zinc }
${vars.base} {
name: "sbtbintray"
// compile using 0.13, but compile a plugin that matches ${FRESHSBTVERSION}
uri: "https://github.com/sbt/sbt-bintray.git#"${vars.sbtbintray}
extra.test-tasks: [ test, scripted ]
extra.skip-missing-tests: true
extra.commands: [ "set scriptedLaunchOpts ++= Seq(\"-Dsbt.override.build.repos=true\", (\"-Dsbt.repository.config=\"+(baseDirectory.value.getAbsolutePath())+\"/.dbuild/repositories\"), (\"-Dsbt.ivy.home=\"+(baseDirectory.value.getAbsolutePath())+\"/.dbuild/ivy2\"))",
"set bintrayRelease in root := ((): Unit)",
"set sbtVersion in pluginCrossBuild := \""${FRESHSBTVERSION}"\"" ]
extra.sbt-version: "0.13.16"
}
// Other projects, already ported to 1.x
${vars.base} {
name: "akka-stuff"
uri: ${vars.uris.akka-stuff-uri}
extra.options: ["-Dakka.genjavadoc.enabled=false", "-Dakka.scaladoc.diagrams=false", "-Dakka.build.aggregateSamples=false", "-XX:ReservedCodeCacheSize=480M"]
extra.projects: ["akka-actor", "akka-scala-nightly"]
extra.commands: ${vars.default-commands} [
// https://github.com/scala/community-builds/issues/373
"set every apiURL := None"
]
extra.exclude: [
"akka-docs" // this is Sphinx stuff, not really apropos here, no Sphinx on Jenkins anyway
"akka-bench-jmh" // we'd have to add a resolver to get the JMH dependency - ST 8/17/15
]
extra.test-tasks: ["compile"]
// TODO: should run the tests of akka-actor, at least.
}
${vars.base} {
name: "akka-http"
uri: ${vars.uris.akka-http-uri}
extra.exclude: ["docs", "akka-http-bench-jmh"]
extra.options: [
"-Dakka.genjavadoc.enabled=false", "-Dakka.scaladoc.diagrams=false"
"-Dbintray.user=dummy", "-Dbintray.pass=dummy"
]
extra.commands: ${vars.default-commands} [
"set every bintrayReleaseOnPublish := false"
// Scaladoc generation failure reported upstream at https://github.com/akka/akka/issues/21543
"set sources in doc in Compile in httpCore := List()"
]
// "HTTP is sadly very timing sensitive we're working on improving its stability regularly,
// OK to disable it for now." - Konrad M, October 2016
// reconfirmed January 2018 that some tests are failing. in one run, it was:
// * akka.http.impl.engine.client.NewConnectionPoolSpec
// * akka.http.impl.engine.client.HostConnectionPoolSpec
extra.test-tasks: ["compile"]
}
${vars.base} {
name: "scalariform"
uri: ${vars.uris.scalariform-uri}
}
${vars.base} {
name: "scalaz"
uri: ${vars.uris.scalaz-uri}
extra.projects: ["rootJVM"] // no Scala.js please
}
${vars.base} {
name: "breeze"
uri: ${vars.uris.breeze-uri}
// failing tests not investigated/reported
extra.test-tasks: ["compile"]
// spire moved from org.spire to org.typelevel but breeze hasn't
// changed their dependency yet
deps.ignore: ["org.spire-math#spire"]
deps.inject: ${vars.base.deps.inject} [
"org.typelevel#spire"
]
check-missing: false
}
// tracking "develop" branch.
// try master instead if develop proves too fragile?
${vars.base} {
name: "twitter-util"
uri: ${vars.uris.twitter-util-uri}
extra.exclude: [
// this isn't really necessary and would pull in a JMH dependency
"util-benchmark"
// this is 2.11-only
"util-intellij"
]
// recommended at https://github.com/twitter/util/issues/173:
// "We use that when we don't think the tests will be reliable in a ci environment"
extra.options: ["-DSKIP_FLAKY=true"]
}
${vars.base} {
name: "lightbend-emoji"
uri: ${vars.uris.lightbend-emoji-uri}
extra.options: ["-Dbintray.user=dummy", "-Dbintray.pass=dummy"]
}
// frozen (November 2017) at an October 2017 commit, because more
// recent commits require a newer cats, too new for other libraries
// in the community build; see https://github.com/scala/community-builds/pull/624
${vars.base} {
name: "cats-effect"
uri: ${vars.uris.cats-effect-uri}
extra.projects: ["coreJVM", "lawsJVM"] // no Scala.js plz
extra.options: [
"-Xss1M"
]
}
${vars.base} {
name: "cats"
uri: ${vars.uris.cats-uri}
// for some reason, adding the umbrella "catsJVM" project but excluding "bench"
// and "docs" doesn't succeed in removing the depending on cats-bench.
// using deps.ignore doesn't fix it either. not sure how else to fix it
// other than just enumerating what we want:
extra.projects: ["coreJVM", "freeJVM", "kernelJVM", "kernelLawsJVM", "lawsJVM", "macrosJVM", "testsJVM"]
extra.commands: ${vars.default-commands} [
// too fragile
"removeScalacOptions -Xfatal-warnings"
]
}
//
// Scalachess depends on scalalib, which is not published anywhere in particular;
// the Scala community build recompiles scalalib from source, but we have independent
// projects. So: publish scalalib to an (otherwise empty) subspace of "default",
// and scalachess looks in there (as well as into default). This is the only inter-project
// dependency we have.
//
// frozen (December 2017) at November 2017 before a newer commit
// introduced a test failure: https://github.com/ornicar/scalachess/issues/133
${vars.base} {
space.from: default.scalalib
space.to: ""
name: "scalachess"
uri: ${vars.uris.scalachess-uri}
}
// dependency of scalachess
${vars.base} {
space.from: default
space.to: default.scalalib
name: "scalalib"
uri: ${vars.uris.scalalib-uri}
}
${vars.base} {
name: "scalacheck"
uri: ${vars.uris.scalacheck-uri}
extra.projects: ["jvm"] // no Scala.js please
extra.commands: ${vars.default-commands} [
// because of new unused warnings in 2.12.2
"removeScalacOptions -Xfatal-warnings"
]
}
${vars.base} {
name: "akka-http-cors"
uri: ${vars.uris.akka-http-cors-uri}
extra.exclude: ["akka-http-cors-bench-jmh"]
}
// dependency of scaladex.
// only attempt the subproject scaladex needs.
${vars.base} {
name: "akka-http-session"
uri: ${vars.uris.akka-http-session-uri}
extra.projects: ["core"]
}
// 3.5 is the current stable branch (as of Oct 2016)
// there is also a brand-new development branch, 3.6, we should
// maybe switch to at some point
// ${vars.base} {
// name: "json4s"
// uri: ${vars.uris.json4s-uri}
// // TODO: exclude subprojects we don't want, rather than naming a few we want. probably adding more would work?
// extra.projects: ["json4s-native", "json4s-jackson", "json4s-ast"]
// }
${vars.base} {
name: "circe"
uri: ${vars.uris.circe-uri}
extra.projects: [
// easy
"coreJVM", "numbersJVM"
// harder
"jawn"
// bunch more stuff that all depends on jawn
"parserJVM", "genericJVM", "literalJVM", "scodecJVM", "testingJVM", "testsJVM"
]
}
${vars.base} {
name: "circe-config"
uri: ${vars.uris.circe-config-uri}
extra.commands: ${vars.default-commands} [
// too fragile
"removeScalacOptions -Xfatal-warnings"
]
}
// frozen (October 2018) at an October 2018 commit just before source-incompatible
// changes which broke coursier-small and classpath-shrinker downstream.
// note that https://github.com/coursier/coursier/pull/937 (October 2018) adds build-on-JDK-11
// support, so we'll need to unfreeze at some point in order to get that
${vars.base} {
name: "coursier"
uri: ${vars.uris.coursier-uri}
// no Scala.js or Scala Native plz
extra.projects: ["jvm"]
// these depend on Scala Native
extra.exclude: ["extra", "cli"]
}
${vars.base} {
name: "swoval"
uri: ${vars.uris.swoval-uri}
// only test jvm projects
extra.projects: ["filesJVM", "testingJVM", "plugin"]
}
// ^^ add new projects above here ^^
// elastic4s has not been ported to sbt >0.13, as of 2019-01-19
// ${vars.base} {
// name: "elastic4s"
// uri: ${vars.uris.elastic4s-uri}
// extra.projects: ["elastic4s-core", "elastic4s-embedded"]
// // some test code uses scala.util.parsing.json, which no longer
// // exists in the latest scala-parser-combinators
// extra.run-tests: false
// }
]
// end of projects
}
options.resolvers: {
"R0000" : "local"
"R0001" : "sbt-snapshots: http://jenkins.scala-sbt.org/sbt-snapshots"
"R0002" : "proxy-ch-maven: https://proxy-ch.typesafe.com:8082/artifactory/repo"
"R0003" : "proxy-ch-ivy: https://proxy-ch.typesafe.com:8082/artifactory/repo, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]"
}