Skip to content
Browse files

fix build for cross compilation between 2.9 and 2.10

  • Loading branch information...
1 parent 64e201d commit e473675e419820560da3a96b20cdc22854b4799a @ldeck ldeck committed Aug 5, 2013
Showing with 17 additions and 9 deletions.
  1. +7 −4 build.sbt
  2. +9 −3 project/plugins.sbt
  3. +0 −1 src/main/scala/code/comet/Clock.scala
  4. +1 −1 src/main/scala/code/lib/DependencyFactory.scala
View
11 build.sbt
@@ -5,11 +5,14 @@ name := "Templating With Twitter Bootstrap"
version := "0.4.8-SNAPSHOT"
-crossScalaVersions := Seq("2.10.2", "2.9.2", "2.9.1-1", "2.9.1")
+scalaVersion := "2.9.2"
-scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature")
+crossScalaVersions := Seq("2.10.0", "2.9.2", "2.9.1-1", "2.9.1")
-scalaVersion := "2.10.2"
+scalacOptions <<= scalaVersion map { v: String =>
+ val opts = "-deprecation" :: "-unchecked" :: Nil
+ if (v.startsWith("2.9.")) opts else opts ++ ("-feature" :: "-language:postfixOps" :: Nil)
+}
seq(webSettings :_*)
@@ -38,7 +41,7 @@ libraryDependencies ++= {
"net.liftweb" %% "lift-squeryl-record" % liftVersion % "compile",
"net.liftweb" %% "lift-wizard" % liftVersion % "compile",
"net.liftweb" %% "lift-testkit" % liftVersion % "compile",
- "net.liftmodules" %% "fobo_2.5" % "1.0" % "compile"
+ "net.liftmodules" %% "fobo_2.5" % "1.0" % "compile"
)
}
View
12 project/plugins.sbt
@@ -1,10 +1,16 @@
-addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.3.0")
+libraryDependencies <+= sbtVersion(v => v match {
+ case "0.11.0" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.0-0.2.8"
+ case "0.11.1" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.1-0.2.10"
+ case "0.11.2" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.2-0.2.11"
+ case "0.11.3" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.3-0.2.11.1"
+ case x if x.startsWith("0.12") => "com.github.siasia" %% "xsbt-web-plugin" % "0.12.0-0.2.11.1"
+})
//Uncoment this line to enable the sbt idea plugin
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.1")
//Uncoment this line to enable the sbt eclipse plugin
-addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0")
+addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0")
//Uncoment this line to enable the sbt ensime plugin
-addSbtPlugin("org.ensime" % "ensime-sbt-cmd" % "0.1.1")
+addSbtPlugin("org.ensime" % "ensime-sbt-cmd" % "0.1.0")
View
1 src/main/scala/code/comet/Clock.scala
@@ -5,7 +5,6 @@ import net.liftweb.util.Schedule
import net.liftweb.util.Helpers._
import net.liftweb.http.CometActor
import net.liftweb.http.js.JsCmds.SetHtml
-import scala.language.postfixOps
case object Tick
View
2 src/main/scala/code/lib/DependencyFactory.scala
@@ -5,7 +5,7 @@ import net.liftweb._
import http._
import util._
import common._
-import _root_.java.util.Date
+import java.util.Date
/**
* A factory for generating new instances of Date. You can create

0 comments on commit e473675

Please sign in to comment.
Something went wrong with that request. Please try again.