mirror of https://github.com/sbt/sbt.git
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:
parent
05c77ae1e9
commit
cc02bcef87
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue