-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.sbt
71 lines (56 loc) · 1.87 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
import sbt.Tests.{ Group, SubProcess }
name := "scalascriptengine"
organization := "com.googlecode.scalascriptengine"
version := "1.3.11"
pomIncludeRepository := { _ => false }
licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
homepage := Some(url("https://github.com/kostaskougios/scalascriptengine"))
scmInfo := Some(
ScmInfo(
url("https://github.com/kostaskougios/scalascriptengine"),
"scm:https://github.com/kostaskougios/scalascriptengine.git"
)
)
developers := List(
Developer(
id = "[email protected]",
name = "Konstantinos Kougios",
email = "[email protected]",
url = url("https://github.com/kostaskougios")
)
)
publishMavenStyle := true
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
scalaVersion := "2.12.2"
libraryDependencies ++= Seq(
"commons-io" % "commons-io" % "2.1" % Test,
"org.slf4j" % "slf4j-api" % "1.6.4",
"ch.qos.logback" % "logback-classic" % "1.0.0",
"org.scala-lang" % "scala-reflect" % "2.12.2",
"org.scalatest" %% "scalatest" % "3.0.3",
"org.scala-lang" % "scala-compiler" % "2.12.2",
"joda-time" % "joda-time" % "2.9.9"
)
// fork in test cause there are conflicts with sbt classpath
def forkedJvmPerTest(testDefs: Seq[TestDefinition]) = testDefs.groupBy(
test => test.name match {
case "com.googlecode.scalascriptengine.SandboxSuite" =>
test.name
case _ => "global"
}
).map { case (name, tests) =>
Group(
name = name,
tests = tests,
runPolicy = SubProcess(ForkOptions())
)
}.toSeq
//definedTests in Test returns all of the tests (that are by default under src/test/scala).
testGrouping in Test <<= (definedTests in Test) map forkedJvmPerTest
testOptions in Test += Tests.Argument("-oF")