Skip to content

Commit 61c7c1e

Browse files
committed
Updated build to set env
1 parent a43f72b commit 61c7c1e

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

build.sbt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ crossScalaVersions := Seq("2.10.4", "2.11.0")
3838

3939
libraryDependencies := {
4040
CrossVersion.partialVersion(scalaVersion.value) match {
41-
case Some((2, scalaMajor)) if scalaMajor >= 11 =>
41+
case Some((2, scalaMajor)) if scalaMajor == 11 =>
42+
System.setProperty("CrossBuildScalaVersion", "2.11.0")
4243
libraryDependencies.value :+ "org.scala-lang.modules" %% "scala-xml" % "1.0.1"
4344
case _ =>
45+
System.setProperty("CrossBuildScalaVersion", "2.10.4")
4446
libraryDependencies.value
4547
}
4648
}

src/test/scala/scoverage/PluginRunner.scala

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@ import scala.collection.mutable.ListBuffer
1111
trait PluginSupport {
1212

1313
val scalaVersion = "2.11.0"
14+
// System.getProperty("CrossBuildScalaVersion")
1415
val shortScalaVersion = scalaVersion.dropRight(2)
1516

16-
val settings = new scala.tools.nsc.Settings
1717
val classPath = getScalaJars.map(_.getAbsolutePath) :+ sbtCompileDir.getAbsolutePath
18-
settings.Xprint.value = List("all")
19-
settings.Yrangepos.value = true
20-
settings.classpath.value = classPath.mkString(":")
18+
19+
val settings = {
20+
val settings = new scala.tools.nsc.Settings
21+
settings.Xprint.value = List("all")
22+
settings.Yrangepos.value = true
23+
settings.classpath.value = classPath.mkString(":")
24+
settings
25+
}
2126

2227
val reporter = new scala.tools.nsc.reporters.ConsoleReporter(settings)
2328

0 commit comments

Comments
 (0)