forked from janm399/specs2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
95 lines (69 loc) · 2.7 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
82
83
84
85
86
87
88
89
90
91
92
93
94
import sbtrelease._
import Release._
import ReleaseKeys._
/** Project */
name := "specs2"
version := "1.7.1"
organization := "org.specs2"
scalaVersion := "2.9.1"
crossScalaVersions := Seq("2.9.0")
/** Shell */
shellPrompt := { state => System.getProperty("user.name") + "> " }
shellPrompt in ThisBuild := { state => Project.extract(state).currentRef.project + "> " }
/** Dependencies */
resolvers ++= Seq("snapshots-repo" at "http://scala-tools.org/repo-snapshots",
"Local Maven Repository" at "file://c:/Documents and Settings/Eric/.m2/repository")
libraryDependencies <<= scalaVersion { scala_version => Seq(
"org.specs2" %% "specs2-scalaz-core" % "6.0.1",
"org.scala-lang" % "scala-compiler" % scala_version % "optional",
"org.scala-tools.testing" %% "scalacheck" % "1.9" % "optional",
"org.scala-tools.testing" % "test-interface" % "0.5" % "optional",
"org.hamcrest" % "hamcrest-all" % "1.1" % "optional",
"org.mockito" % "mockito-all" % "1.8.5" % "optional",
"junit" % "junit" % "4.7" % "optional",
"org.pegdown" % "pegdown" % "1.0.2" % "optional"
)
}
/** Compilation */
javacOptions ++= Seq("-Xmx1812m", "-Xms512m", "-Xss6m")
javaOptions += "-Xmx2G"
scalacOptions ++= Seq("-deprecation", "-unchecked")
maxErrors := 20
pollInterval := 1000
logBuffered := false
cancelable := true
testOptions := Seq(Tests.Filter(s =>
Seq("Spec", "Suite", "Unit", "all").exists(s.endsWith(_)) &&
!s.endsWith("FeaturesSpec") ||
s.contains("UserGuide") ||
s.contains("index") ||
s.matches("org.specs2.guide.*")))
/** Console */
initialCommands in console := "import org.specs2._"
seq(releaseSettings: _*)
releaseProcess <<= thisProjectRef apply { ref =>
import ReleaseStateTransformations._
Seq[ReleasePart](
initialGitChecks,
checkSnapshotDependencies,
releaseTask(check in Posterous in ref),
inquireVersions,
setReleaseVersion,
runTest,
commitReleaseVersion,
tagRelease,
releaseTask(publish in Global in ref),
releaseTask(publish in Posterous in ref),
setNextVersion,
commitNextVersion
)
}
/** Publishing */
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
publishTo <<= (version) { version: String =>
val nexus = "http://nexus-direct.scala-tools.org/content/repositories/"
if (version.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus+"snapshots/")
else Some("releases" at nexus+"releases/")
}
seq(lsSettings :_*)
(LsKeys.ghBranch in LsKeys.lsync) := Some("1.7.1")