Permalink
Browse files

Extracted versions into new object and created new val for the cross …

…versions
  • Loading branch information...
1 parent ee76bbf commit 08980a79f2ef37cfc5f2ee1ed64066b0f88a7b59 Tim Sheppard committed Jan 31, 2013
Showing with 14 additions and 6 deletions.
  1. +14 −6 project/Build.scala
View
@@ -1,9 +1,11 @@
import sbt._
import Keys._
+import Versions._
+
object Settings {
val buildOrganization = "templemore"
- val buildScalaVersion = "2.9.2"
+ val buildScalaVersion = scala2_9
val buildVersion = "0.7.2"
val buildSettings = Defaults.defaultSettings ++
@@ -16,9 +18,6 @@ object Settings {
object Dependencies {
- private val CucumberVersionForScala2_9 = "1.0.9"
- private val CucumberVersionForScala2_10 = "1.1.1"
-
def cucumberScala(scalaVersion: String) = {
def cucumberVersion = if ( scalaVersion.startsWith("2.10") ) CucumberVersionForScala2_10 else CucumberVersionForScala2_9
"info.cukes" % "cucumber-scala" % cucumberVersion % "compile"
@@ -32,18 +31,27 @@ object Build extends Build {
import Dependencies._
import Settings._
+ private val crossVersions = Seq(scala2_9, scala2_10)
+
lazy val parentProject = Project("sbt-cucumber-parent", file ("."),
settings = buildSettings ++
- Seq(crossScalaVersions := Seq("2.9.2", "2.10.0-RC2"))) aggregate (pluginProject, integrationProject)
+ Seq(crossScalaVersions := crossVersions)) aggregate (pluginProject, integrationProject)
lazy val pluginProject = Project("sbt-cucumber-plugin", file ("plugin"),
settings = buildSettings ++
Seq(sbtPlugin := true))
lazy val integrationProject = Project ("sbt-cucumber-integration", file ("integration"),
settings = buildSettings ++
- Seq(crossScalaVersions := Seq("2.9.2", "2.10.0-RC2"),
+ Seq(crossScalaVersions := crossVersions,
libraryDependencies <+= scalaVersion { sv => cucumberScala(sv) },
libraryDependencies += testInterface))
}
+
+object Versions {
+ val scala2_9 = "2.9.2"
+ val scala2_10 = "2.10.0"
+ val CucumberVersionForScala2_9 = "1.0.9"
+ val CucumberVersionForScala2_10 = "1.1.1"
+}

0 comments on commit 08980a7

Please sign in to comment.