aboutsummaryrefslogtreecommitdiff
path: root/build.sbt
diff options
context:
space:
mode:
Diffstat (limited to 'build.sbt')
-rw-r--r--build.sbt23
1 files changed, 19 insertions, 4 deletions
diff --git a/build.sbt b/build.sbt
index 7eba7cd..2ee1235 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,5 +1,8 @@
scalaVersion := "2.10.2"
+// Uncomment to test with a locally built copy of Scala.
+// scalaHome := Some(file("/code/scala2/build/pack"))
+
organization := "org.typesafe.async" // TODO new org name under scala-lang.
name := "scala-async"
@@ -23,10 +26,22 @@ parallelExecution in Global := false
autoCompilerPlugins := true
-libraryDependencies <<= (scalaVersion, libraryDependencies) {
- (ver, deps) =>
- deps :+ compilerPlugin("org.scala-lang.plugins" % "continuations" % ver)
-}
+scalacOptions ++= (scalaHome.value match {
+ case Some(sh) =>
+ // Use continuations plugin from the local scala instance
+ val continuationsJar = sh / "misc" / "scala-devel" / "plugins" / "continuations.jar"
+ ("-Xplugin:" + continuationsJar.getAbsolutePath) :: Nil
+ case None =>
+ Nil
+})
+
+libraryDependencies ++= (scalaHome.value match {
+ case Some(sh) =>
+ Nil
+ case None =>
+ // Use continuations plugin from the published artifact.
+ compilerPlugin("org.scala-lang.plugins" % "continuations" % scalaVersion.value) :: Nil
+})
scalacOptions += "-P:continuations:enable"