summaryrefslogtreecommitdiff
path: root/project/RemoteDependencies.scala
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2012-06-14 09:08:37 -0400
committerJosh Suereth <joshua.suereth@gmail.com>2012-06-14 09:08:37 -0400
commit48fc0393808408cd974a80d6ca65b33003599e14 (patch)
treefe60e2567dcd38d7c21266a708e87e451e5c1820 /project/RemoteDependencies.scala
parent970b7a168b211d22b452306cecaefd56db8438e8 (diff)
downloadscala-48fc0393808408cd974a80d6ca65b33003599e14.tar.gz
scala-48fc0393808408cd974a80d6ca65b33003599e14.tar.bz2
scala-48fc0393808408cd974a80d6ca65b33003599e14.zip
More fixups.
Diffstat (limited to 'project/RemoteDependencies.scala')
-rw-r--r--project/RemoteDependencies.scala29
1 files changed, 18 insertions, 11 deletions
diff --git a/project/RemoteDependencies.scala b/project/RemoteDependencies.scala
index 3f0fc2abf8..705b9dc402 100644
--- a/project/RemoteDependencies.scala
+++ b/project/RemoteDependencies.scala
@@ -11,18 +11,25 @@ object RemoteDependencies {
// TODO -fix up scalacheck's dependencies!
val extracted = Project.extract(state)
import extracted._
+ val scalaVersionString = extracted get version
+
def fix(s: Setting[_]): Setting[_] = s match {
- case ScopedExternalSetting(p, scalaInstance.key, setting) if externalProjects(p) => localScala mapKey Project.mapScope(_ => s.key.scope)
- case s => s
- }
- val transformed = session.mergeSettings map ( s => fix(s) )
- val scopes = transformed collect { case ScopedExternalSetting(p, _, s) if externalProjects(p) => s.key.scope } toSet
- // Create some fixers so we don't download scala or rely on it.
- val fixers = for { scope <- scopes
- setting <- Seq(autoScalaLibrary := false, crossPaths := false)
- } yield setting mapKey Project.mapScope(_ => scope)
- val newStructure = Load.reapply(transformed ++ fixers, structure)
- Project.setProject(session, newStructure, state).put(buildFixed, true)
+ case ScopedExternalSetting(p, scalaInstance.key, setting) if externalProjects(p) => localScala mapKey Project.mapScope(_ => s.key.scope)
+ // TODO - Fix Actors dependency...
+ //case ScopedExternalSetting(p, libraryDependencies.key, setting) if externalProjects(p) => fixProjectDeps(s)
+ case s => s
+ }
+ val transformed = session.mergeSettings map ( s => fix(s) )
+ val scopes = transformed collect { case ScopedExternalSetting(p, _, s) if externalProjects(p) => s.key.scope } toSet
+ // Create some fixers so we don't download scala or rely on it.
+ // Also add dependencies that disappear in 2.10 for now...
+ val fixers = for { scope <- scopes
+ setting <- Seq(autoScalaLibrary := false,
+ crossPaths := false,
+ scalaVersion := scalaVersionString)
+ } yield setting mapKey Project.mapScope(_ => scope)
+ val newStructure = Load.reapply(transformed ++ fixers, structure)
+ Project.setProject(session, newStructure, state).put(buildFixed, true)
}
},
onLoad in Global <<= (onLoad in Global) apply (_ andThen { (state: State) =>