-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathbuild.sbt
81 lines (67 loc) · 2.29 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
72
73
74
75
76
77
78
79
80
81
name := "scala-stm"
organization := "org.scala-stm"
version := "0.8-SNAPSHOT"
def mimaVersion = "0.8"
scalaVersion := "2.12.4"
crossScalaVersions := Seq("2.11.12", "2.12.4", "2.13.0-M3")
scalacOptions ++= Seq("-deprecation", "-feature")
javacOptions in (Compile, compile) ++= {
val javaVersion = if (scalaVersion.value.startsWith("2.11")) "1.6" else "1.8"
Seq("-source", javaVersion, "-target", javaVersion)
}
libraryDependencies += {
val v = if (scalaVersion.value == "2.13.0-M3") "3.0.5-M1" else "3.0.5"
"org.scalatest" %% "scalatest" % v % "test"
}
libraryDependencies += ("junit" % "junit" % "4.12" % "test")
mimaPreviousArtifacts := Set(organization.value %% name.value % mimaVersion)
// skip exhaustive tests
testOptions += Tests.Argument("-l", "slow")
// test of TxnExecutor.transformDefault must be run by itself
parallelExecution in Test := false
////////////////////
// publishing
pomExtra := {
<url>http://nbronson.github.com/scala-stm/</url>
<licenses>
<license>
<name>BSD</name>
<url>https://github.com/nbronson/scala-stm/blob/master/LICENSE.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:git@github.com:nbronson/scala-stm.git</connection>
<url>git@github.com:nbronson/scala-stm.git</url>
</scm>
<developers>
<developer>
<id>nbronson</id>
<name>Nathan Bronson</name>
<email>ngbronson@gmail.com</email>
</developer>
</developers>
}
publishMavenStyle := true
publishTo := {
val base = "https://oss.sonatype.org/"
if (version.value.trim.endsWith("SNAPSHOT"))
Some("snapshots" at base + "content/repositories/snapshots/")
else
Some("releases" at base + "service/local/staging/deploy/maven2/")
}
// exclude scalatest from the Maven POM
pomPostProcess := { xi: scala.xml.Node =>
import scala.xml._
val badDeps = (xi \\ "dependency").filter {
x => (x \ "artifactId").text != "scala-library"
} .toSet
def filt(root: Node): Node = root match {
case x: Elem =>
val ch = x.child.filter(!badDeps(_)).map(filt)
Elem(x.prefix, x.label, x.attributes, x.scope, ch.isEmpty, ch: _*)
case x => x
}
filt(xi)
}
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")