-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
64 lines (58 loc) · 2.21 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
// Convenient setting that allows writing `set scalaVersion := dotty.value` in sbt shell to switch from Scala to Dotty
val dotty = settingKey[String]("dotty version")
dotty in ThisBuild := "0.23.0-RC1"
resolvers in ThisBuild ++= Seq(
"scala-pr-validation-snapshots" at "https://scala-ci.typesafe.com/artifactory/scala-pr-validation-snapshots/",
"scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/")
val collectionsScalaVersionSettings = Seq(
crossScalaVersions := scalaVersion.value :: dotty.value :: Nil
)
val commonSettings = Seq(
organization := "org.scala-lang",
name := "collection-benchmark",
version := "0.1.0-SNAPSHOT",
scalaVersion := "2.13.1",
scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-language:higherKinds"/*, "-opt:l:classpath"*/),
scalacOptions ++= {
if (!isDotty.value)
Seq("-opt-warnings") // This option does not exist in Dotty
else
Seq()
},
scalacOptions in (Compile, doc) ++= Seq("-implicits", "-groups"),
testOptions += Tests.Argument(TestFrameworks.JUnit, "-q", "-v", "-s", "-a"),
fork in Test := true,
parallelExecution in Test := false,
homepage := Some(url("https://github.com/odd/collection-benchmark")),
scmInfo := Some(
ScmInfo(
url("https://github.com/odd/collection-benchmark"),
"scm:git:git@github.com:odd/collection-benchmark.git"
)),
publishArtifact := false,
// The above is enough for Maven repos but it doesn't prevent publishing of ivy.xml files
publish := ((): Unit),
publishLocal := ((): Unit),
pomExtra :=
<developers>
<developer><id>odd</id><name>Odd Möller</name></developer>
</developers>
)
val collections = project.in(file("collections"))
.settings(commonSettings)
.settings(
collectionsScalaVersionSettings,
name := "collections",
libraryDependencies ++= Seq(
"com.novocode" % "junit-interface" % "0.11" % Test
)
)
val time = project.in(file("time"))
.dependsOn(collections)
.enablePlugins(JmhPlugin)
.settings(commonSettings)
.settings(mainClass in (Jmh, run) := Some("collection.benchmark.JmhRunner"))
val memory = project.in(file("memory"))
.dependsOn(collections)
.enablePlugins(JmhPlugin)
.settings(commonSettings)