mirror of https://github.com/sbt/sbt.git
Only set scriptedBatchExcution true for >= 1.4
In #6091, we updated the ScriptedPlugin to set scriptedBatchExecution := true for all 1.x versions but not 0.13. This commit further restricts the setting so that it is only set for sbt >= 1.4, which seems necessary based on the comments in #6094.
This commit is contained in:
parent
a84d3329aa
commit
d686bead0b
|
|
@ -23,6 +23,7 @@ import sbt.io.syntax._
|
|||
import sbt.librarymanagement._
|
||||
import sbt.librarymanagement.syntax._
|
||||
import sbt.nio.file.{ Glob, RecursiveGlob }
|
||||
import scala.util.Try
|
||||
|
||||
object ScriptedPlugin extends AutoPlugin {
|
||||
|
||||
|
|
@ -79,7 +80,15 @@ object ScriptedPlugin extends AutoPlugin {
|
|||
scriptedClasspath := getJars(ScriptedConf).value,
|
||||
scriptedTests := scriptedTestsTask.value,
|
||||
scriptedParallelInstances := 1,
|
||||
scriptedBatchExecution := CrossVersionUtil.binarySbtVersion(scriptedSbt.value) != "0.13",
|
||||
scriptedBatchExecution := {
|
||||
val binVersion = CrossVersionUtil.binarySbtVersion(scriptedSbt.value)
|
||||
val versionParts =
|
||||
binVersion.split("\\.").flatMap(p => Try(p.takeWhile(_.isDigit).toInt).toOption).take(2)
|
||||
versionParts match {
|
||||
case Array(major, minor) => major > 1 || (major == 1 && minor >= 4)
|
||||
case _ => false
|
||||
}
|
||||
},
|
||||
scriptedRun := scriptedRunTask.value,
|
||||
scriptedDependencies := {
|
||||
def use[A](@deprecated("unused", "") x: A*): Unit = () // avoid unused warnings
|
||||
|
|
|
|||
Loading…
Reference in New Issue