mirror of https://github.com/sbt/sbt.git
Cleanup
This commit is contained in:
parent
12d2ecfa62
commit
2aed011bc9
|
|
@ -80,17 +80,21 @@ object ScriptedPlugin extends AutoPlugin {
|
||||||
ModuleUtilities.getObject("sbt.test.ScriptedTests", loader)
|
ModuleUtilities.getObject("sbt.test.ScriptedTests", loader)
|
||||||
}
|
}
|
||||||
|
|
||||||
private[this] val fCls = classOf[File]
|
|
||||||
private[this] val bCls = classOf[Boolean]
|
|
||||||
private[this] val asCls = classOf[Array[String]]
|
|
||||||
private[this] val lfCls = classOf[java.util.List[File]]
|
|
||||||
private[this] val iCls = classOf[Integer]
|
|
||||||
|
|
||||||
def scriptedRunTask: Initialize[Task[Method]] = Def.taskDyn {
|
def scriptedRunTask: Initialize[Task[Method]] = Def.taskDyn {
|
||||||
|
val fCls = classOf[File]
|
||||||
|
val bCls = classOf[Boolean]
|
||||||
|
val asCls = classOf[Array[String]]
|
||||||
|
val lfCls = classOf[java.util.List[File]]
|
||||||
|
val iCls = classOf[Int]
|
||||||
|
|
||||||
val clazz = scriptedTests.value.getClass
|
val clazz = scriptedTests.value.getClass
|
||||||
if (scriptedBatchExecution.value)
|
val method =
|
||||||
Def.task(clazz.getMethod("runInParallel", fCls, bCls, asCls, fCls, asCls, lfCls, iCls))
|
if (scriptedBatchExecution.value)
|
||||||
else Def.task(clazz.getMethod("run", fCls, bCls, asCls, fCls, asCls, lfCls))
|
clazz.getMethod("runInParallel", fCls, bCls, asCls, fCls, asCls, lfCls, iCls)
|
||||||
|
else
|
||||||
|
clazz.getMethod("run", fCls, bCls, asCls, fCls, asCls, lfCls)
|
||||||
|
|
||||||
|
Def.task(method)
|
||||||
}
|
}
|
||||||
|
|
||||||
import DefaultParsers._
|
import DefaultParsers._
|
||||||
|
|
@ -150,8 +154,8 @@ object ScriptedPlugin extends AutoPlugin {
|
||||||
val log: java.lang.Boolean = scriptedBufferLog.value
|
val log: java.lang.Boolean = scriptedBufferLog.value
|
||||||
val launcher = sbtLauncher.value
|
val launcher = sbtLauncher.value
|
||||||
val opts = scriptedLaunchOpts.value.toArray
|
val opts = scriptedLaunchOpts.value.toArray
|
||||||
val empty = new java.util.ArrayList()
|
val empty = new java.util.ArrayList[File]()
|
||||||
val instances: Integer = scriptedParallelInstances.value
|
val instances: java.lang.Integer = scriptedParallelInstances.value
|
||||||
|
|
||||||
if (scriptedBatchExecution.value)
|
if (scriptedBatchExecution.value)
|
||||||
method.invoke(scriptedInstance, dir, log, args.toArray, launcher, opts, empty, instances)
|
method.invoke(scriptedInstance, dir, log, args.toArray, launcher, opts, empty, instances)
|
||||||
|
|
|
||||||
|
|
@ -382,7 +382,7 @@ class ScriptedRunner {
|
||||||
bootProps: File,
|
bootProps: File,
|
||||||
launchOpts: Array[String],
|
launchOpts: Array[String],
|
||||||
prescripted: java.util.List[File],
|
prescripted: java.util.List[File],
|
||||||
instances: Integer
|
instances: Int
|
||||||
): Unit = {
|
): Unit = {
|
||||||
val logger = ConsoleLogger()
|
val logger = ConsoleLogger()
|
||||||
val addTestFile = (f: File) => { prescripted.add(f); () }
|
val addTestFile = (f: File) => { prescripted.add(f); () }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue