File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 1
1
scalaVersion := " 2.10.2"
2
2
3
+ // Uncomment to test with a locally built copy of Scala.
4
+ // scalaHome := Some(file("/code/scala2/build/pack"))
5
+
3
6
organization := " org.typesafe.async" // TODO new org name under scala-lang.
4
7
5
8
name := " scala-async"
@@ -23,10 +26,22 @@ parallelExecution in Global := false
23
26
24
27
autoCompilerPlugins := true
25
28
26
- libraryDependencies <<= (scalaVersion, libraryDependencies) {
27
- (ver, deps) =>
28
- deps :+ compilerPlugin(" org.scala-lang.plugins" % " continuations" % ver)
29
- }
29
+ scalacOptions ++= (scalaHome.value match {
30
+ case Some (sh) =>
31
+ // Use continuations plugin from the local scala instance
32
+ val continuationsJar = sh / " misc" / " scala-devel" / " plugins" / " continuations.jar"
33
+ (" -Xplugin:" + continuationsJar.getAbsolutePath) :: Nil
34
+ case None =>
35
+ Nil
36
+ })
37
+
38
+ libraryDependencies ++= (scalaHome.value match {
39
+ case Some (sh) =>
40
+ Nil
41
+ case None =>
42
+ // Use continuations plugin from the published artifact.
43
+ compilerPlugin(" org.scala-lang.plugins" % " continuations" % scalaVersion.value) :: Nil
44
+ })
30
45
31
46
scalacOptions += " -P:continuations:enable"
32
47
You can’t perform that action at this time.
0 commit comments