mirror of https://github.com/sbt/sbt.git
Merge pull request #6146 from eatkins/metabuild
Prepend scala instance jars to sbt classpath
This commit is contained in:
commit
a84d3329aa
|
|
@ -1362,7 +1362,9 @@ def scriptedTask(launch: Boolean): Def.Initialize[InputTask[Unit]] = Def.inputTa
|
||||||
scriptedLaunchOpts.value ++ (if (launch) Some(launchJar) else None),
|
scriptedLaunchOpts.value ++ (if (launch) Some(launchJar) else None),
|
||||||
scalaVersion.value,
|
scalaVersion.value,
|
||||||
version.value,
|
version.value,
|
||||||
(scriptedSbtReduxProj / Test / fullClasspathAsJars).value.map(_.data),
|
(scriptedSbtReduxProj / Test / fullClasspathAsJars).value
|
||||||
|
.map(_.data)
|
||||||
|
.filterNot(_.getName.contains("scala-compiler")),
|
||||||
streams.value.log
|
streams.value.log
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2506,14 +2506,15 @@ object Classpaths {
|
||||||
val isMeta = isMetaBuild.value
|
val isMeta = isMetaBuild.value
|
||||||
val force = reresolveSbtArtifacts.value
|
val force = reresolveSbtArtifacts.value
|
||||||
val app = appConfiguration.value
|
val app = appConfiguration.value
|
||||||
val sbtCp0 = app.provider.mainClasspath.toList
|
def isJansiOrJLine(f: File) = f.getName.contains("jline") || f.getName.contains("jansi")
|
||||||
val sbtCp = sbtCp0 map { Attributed.blank(_) }
|
val scalaInstanceJars = app.provider.scalaProvider.jars.filterNot(isJansiOrJLine)
|
||||||
|
val sbtCp = (scalaInstanceJars ++ app.provider.mainClasspath).map(Attributed.blank)
|
||||||
val mjars = managedJars(
|
val mjars = managedJars(
|
||||||
classpathConfiguration.value,
|
classpathConfiguration.value,
|
||||||
classpathTypes.value,
|
classpathTypes.value,
|
||||||
update.value
|
update.value
|
||||||
)
|
)
|
||||||
if (isMeta && !force) mjars ++ sbtCp
|
if (isMeta && !force) (mjars ++ sbtCp).distinct
|
||||||
else mjars
|
else mjars
|
||||||
},
|
},
|
||||||
exportedProducts := ClasspathImpl.trackedExportedProducts(TrackLevel.TrackAlways).value,
|
exportedProducts := ClasspathImpl.trackedExportedProducts(TrackLevel.TrackAlways).value,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import scala.tools.nsc
|
||||||
|
|
||||||
|
object Plugin
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
> show sbtVersion
|
||||||
|
# we just want to test that the project loads
|
||||||
Loading…
Reference in New Issue