-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
52 lines (43 loc) · 1.79 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
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / organization := "org.tayvs"
ThisBuild / scalaVersion := "2.13.12"
ThisBuild / resolvers += "Artima Maven Repository" at "https://repo.artima.com/releases"
lazy val future = (project in file("."))
.enablePlugins(JmhPlugin)
.settings(
libraryDependencies ++= Seq(
// "org.scalactic" %% "scalactic" % "3.2.16" % "test",
"org.scalatest" %% "scalatest" % "3.2.16" % "test"
)
)
lazy val bench = project
.dependsOn(future % "test->test")
.enablePlugins(JmhPlugin)
.settings(
Jmh / sourceDirectory := (Test / sourceDirectory).value,
Jmh / classDirectory := (Test / classDirectory).value,
Jmh / dependencyClasspath := (Test / dependencyClasspath).value,
// rewire tasks, so that 'bench/Jmh/run' automatically invokes 'bench/Jmh/compile' (otherwise a clean 'bench/Jmh/run' would fail)
Jmh / compile := (Jmh / compile).dependsOn(Test / compile).value,
Jmh / run := (Jmh / run).dependsOn(Jmh / compile).evaluated
)
lazy val futureOverride = (project in file("future-override"))
.dependsOn(future)
lazy val test = (project in file("test"))
.settings(
libraryDependencies += "org.tayvs" %% "futureoverride" % "0.1.0-SNAPSHOT",
dependencyOverrides += "org.tayvs" %% "futureoverride" % "0.1.0-SNAPSHOT",
// Compile / managedClasspath += Attributed.blank(file("lib/scala")),
assembly / assemblyMergeStrategy := {
case PathList("scala", "concurrent", _*) => MergeStrategy.first
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
if (oldStrategy == MergeStrategy.deduplicate)
MergeStrategy.first
else
oldStrategy(x)
}
// managedClasspath / excludeFilter := "Future$.scala"
// classPath
// dependencyClasspath
)