Skip to content

Commit 08980a7

Browse files
author
Tim Sheppard
committed
Extracted versions into new object and created new val for the cross versions
1 parent ee76bbf commit 08980a7

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

Diff for: project/Build.scala

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import sbt._
22
import Keys._
33

4+
import Versions._
5+
46
object Settings {
57
val buildOrganization = "templemore"
6-
val buildScalaVersion = "2.9.2"
8+
val buildScalaVersion = scala2_9
79
val buildVersion = "0.7.2"
810

911
val buildSettings = Defaults.defaultSettings ++
@@ -16,9 +18,6 @@ object Settings {
1618

1719
object Dependencies {
1820

19-
private val CucumberVersionForScala2_9 = "1.0.9"
20-
private val CucumberVersionForScala2_10 = "1.1.1"
21-
2221
def cucumberScala(scalaVersion: String) = {
2322
def cucumberVersion = if ( scalaVersion.startsWith("2.10") ) CucumberVersionForScala2_10 else CucumberVersionForScala2_9
2423
"info.cukes" % "cucumber-scala" % cucumberVersion % "compile"
@@ -32,18 +31,27 @@ object Build extends Build {
3231
import Dependencies._
3332
import Settings._
3433

34+
private val crossVersions = Seq(scala2_9, scala2_10)
35+
3536
lazy val parentProject = Project("sbt-cucumber-parent", file ("."),
3637
settings = buildSettings ++
37-
Seq(crossScalaVersions := Seq("2.9.2", "2.10.0-RC2"))) aggregate (pluginProject, integrationProject)
38+
Seq(crossScalaVersions := crossVersions)) aggregate (pluginProject, integrationProject)
3839

3940
lazy val pluginProject = Project("sbt-cucumber-plugin", file ("plugin"),
4041
settings = buildSettings ++
4142
Seq(sbtPlugin := true))
4243

4344
lazy val integrationProject = Project ("sbt-cucumber-integration", file ("integration"),
4445
settings = buildSettings ++
45-
Seq(crossScalaVersions := Seq("2.9.2", "2.10.0-RC2"),
46+
Seq(crossScalaVersions := crossVersions,
4647
libraryDependencies <+= scalaVersion { sv => cucumberScala(sv) },
4748
libraryDependencies += testInterface))
4849
}
4950

51+
52+
object Versions {
53+
val scala2_9 = "2.9.2"
54+
val scala2_10 = "2.10.0"
55+
val CucumberVersionForScala2_9 = "1.0.9"
56+
val CucumberVersionForScala2_10 = "1.1.1"
57+
}

0 commit comments

Comments
 (0)