aboutsummaryrefslogtreecommitdiff
path: root/stage2/BasicBuild.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2017-02-14 00:07:57 -0500
committerChristopher Vogt <oss.nsp@cvogt.org>2017-02-14 00:34:48 -0500
commit92b26f394460aa609f9d073ea044776e7d8c46fb (patch)
treecb6deceebc0313e2186e686680b51187ddfd0095 /stage2/BasicBuild.scala
parentdfde369b30bcde1c60add172e0e91caeb51e541b (diff)
downloadcbt-92b26f394460aa609f9d073ea044776e7d8c46fb.tar.gz
cbt-92b26f394460aa609f9d073ea044776e7d8c46fb.tar.bz2
cbt-92b26f394460aa609f9d073ea044776e7d8c46fb.zip
implicitly pass classloader, might make code easier
and prepares for allowing `run` and `runFlat` at Dependency instead of Build level
Diffstat (limited to 'stage2/BasicBuild.scala')
-rw-r--r--stage2/BasicBuild.scala11
1 files changed, 5 insertions, 6 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala
index 9ed6787..5f73568 100644
--- a/stage2/BasicBuild.scala
+++ b/stage2/BasicBuild.scala
@@ -147,16 +147,16 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge
lib.compile(
context.cbtLastModified,
sourceFiles, compileTarget, compileStatusFile, compileDependencies,
- context.paths.mavenCache, scalacOptions, context.classLoaderCache,
+ context.paths.mavenCache, scalacOptions,
zincVersion = zincVersion, scalaVersion = scalaVersion
)
}
- def mainClasses: Seq[Class[_]] = exportedClasspath.files.flatMap( lib.mainClasses( _, classLoader(classLoaderCache) ) )
+ def mainClasses: Seq[Class[_]] = exportedClasspath.files.flatMap( lib.mainClasses( _, classLoader ) )
def runClass: Option[String] = lib.runClass( mainClasses ).map( _.getName )
- def runMain( className: String, args: String* ) = lib.runMain( className, args, classLoader(context.classLoaderCache) )
+ def runMain( className: String, args: String* ) = lib.runMain( className, args, classLoader )
def flatClassLoader: Boolean = false
@@ -200,15 +200,14 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge
}
val scalac = new ScalaCompilerDependency(context.cbtLastModified, context.paths.mavenCache, scalaVersion)
- lib.runMain(
+ runMain(
"scala.tools.nsc.MainGenericRunner",
Seq(
"-bootclasspath",
scalac.classpath.string,
"-classpath",
classpath.string
- ) ++ context.args,
- scalac.classLoader(classLoaderCache)
+ ) ++ context.args : _*
)
}