Skip to content

Commit

Permalink
Add crossCompile support for 2.10 and 2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
charleso committed Jul 22, 2014
1 parent 656035d commit 38d5245
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion project/build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ object build extends Build {
name := "scoobi",
organization := "com.nicta",
scoobiVersion in GlobalScope <<= version,
scalaVersion := "2.11.0")
scalaVersion := "2.11.1",
crossScalaVersions := Seq("2.10.3", "2.11.1")
)

lazy val buildSettings: Seq[Settings] =
buildInfoSettings ++
Expand Down
10 changes: 8 additions & 2 deletions project/dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ object dependencies {
"com.thoughtworks.xstream" % "xstream" % "1.4.4" intransitive(),
"javassist" % "javassist" % "3.12.1.GA",
"com.googlecode.kiama" %% "kiama" % "1.6.0",
if (scalaVersion.contains("2.10"))
"com.chuusai" % s"shapeless_$scalaVersion" % "2.0.0"
else
"com.chuusai" %% "shapeless" % "2.0.0",
"org.apache.commons" % "commons-math" % "2.2" % "test",
"org.apache.commons" % "commons-compress" % "1.0" % "test")
Expand Down Expand Up @@ -59,8 +62,11 @@ object dependencies {
"org.specs2" %% "specs2-html" % specs2Version ,
"org.specs2" %% "specs2-analysis" % specs2Version ).map(_ % "test")

def repl = Seq(
"org.scala-lang" % "jline" % "2.10.3"
def repl(scalaVersion: String) = Seq(
if (scalaVersion.contains("2.10"))
"org.scala-lang" % "jline" % scalaVersion
else
"jline" % "jline" % scalaVersion.split("\\.").take(2).mkString(".")
)

lazy val resolversSettings = resolvers ++= Seq(
Expand Down
2 changes: 1 addition & 1 deletion project/repl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object repl {
dependencies.hadoop(version.value).map(dehadoop) ++
dependencies.scalaz() ++
dependencies.specs2() ++
dependencies.repl
dependencies.repl(scalaVersion.value)

lazy val repl = Seq(
deps,
Expand Down

0 comments on commit 38d5245

Please sign in to comment.