Fixes #1439. Fixes metabuild downloading unused Scala 2.10.2

Scala instance is added to the Ivy graph via autoLibraryDependency.
For metabuilds, scala-library is scoped under “provided” configuration,
which does not seem to evict modules on “compiled” configuration.
This commit turns overrideScalaVersion flag to true for the metabuilds,
so override rules are added for the following modules:
- scala-library
- scala-compiler
- scala-reflect
This commit is contained in:
Eugene Yokota 2014-08-17 23:18:32 -04:00
parent 05c77ae1e9
commit cc02bcef87
1 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,7 @@ object ScalaArtifacts {
val Organization = ScalaOrganization
val LibraryID = ScalaLibraryID
val CompilerID = ScalaCompilerID
val ReflectID = "scala-reflect"
def libraryDependency(version: String): ModuleID = ModuleID(Organization, LibraryID, version)
private[sbt] def toolDependencies(org: String, version: String): Seq[ModuleID] = Seq(
@ -47,6 +48,7 @@ private object IvyScala {
def overrideScalaVersion(module: DefaultModuleDescriptor, version: String) {
overrideVersion(module, Organization, LibraryID, version)
overrideVersion(module, Organization, CompilerID, version)
overrideVersion(module, Organization, ReflectID, version)
}
def overrideVersion(module: DefaultModuleDescriptor, org: String, name: String, version: String) {
val id = new ModuleId(org, name)