-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
62 lines (54 loc) · 1.83 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
import com.typesafe.sbt.pgp.PgpKeys._
import sbtcrossproject.{CrossType, crossProject}
lazy val commonSettings = Seq(
organization := "com.mscharley",
version := "1.0.0-SNAPSHOT",
scalaVersion := "2.11.8",
scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature", "-Xlint")
)
lazy val testingSettings = Seq(
libraryDependencies ++= Seq(
// Testing libraries.
"org.scalatest" %%% "scalatest" % "3.0.1" % "test"
)
)
lazy val xoroshiro128 =
crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Full)
.settings(
commonSettings,
name := "xoroshiro128"
)
.jvmSettings(testingSettings)
.jsSettings(testingSettings)
lazy val xoroshiro128JVM = xoroshiro128.jvm
lazy val xoroshiro128JS = xoroshiro128.js
lazy val xoroshiro128Native = xoroshiro128.native
lazy val benchmark =
crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Full)
.settings(
commonSettings,
name := "xoroshiro128-benchmark",
mainClass in Compile := Some("Benchmark")
)
.jsSettings(
mainClass in Compile := Some("JsBenchmark")
)
.nativeSettings(
mainClass in Compile := Some("NativeBenchmark")
)
.jvmSettings(
mainClass in Compile := Some("JvmBenchmark"),
// Scalameter for speed testing.
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/releases",
libraryDependencies += "com.storm-enroute" %% "scalameter-core" % "0.7"
)
.dependsOn(xoroshiro128)
lazy val benchmarkJVM = benchmark.jvm
lazy val benchmarkJS = benchmark.js
lazy val benchmarkNative = benchmark.native
lazy val `scala-xoroshiro128` =
(project in file("."))
.settings(commonSettings, publish := {}, publishSigned := {})
.aggregate(xoroshiro128JVM, xoroshiro128JS, xoroshiro128Native)