mirror of https://github.com/sbt/sbt.git
parent
6ce09cfed6
commit
d71678faa9
|
|
@ -9,7 +9,7 @@ import complete.{ Parser, DefaultParsers }
|
||||||
import classpath.ClasspathUtilities
|
import classpath.ClasspathUtilities
|
||||||
import java.lang.reflect.{ InvocationTargetException, Method }
|
import java.lang.reflect.{ InvocationTargetException, Method }
|
||||||
import java.util.Properties
|
import java.util.Properties
|
||||||
import CrossVersion.binarySbtVersion
|
import CrossVersion.partialVersion
|
||||||
|
|
||||||
object ScriptedPlugin extends Plugin {
|
object ScriptedPlugin extends Plugin {
|
||||||
def scriptedConf = config("scripted-sbt") hide
|
def scriptedConf = config("scripted-sbt") hide
|
||||||
|
|
@ -101,20 +101,18 @@ object ScriptedPlugin extends Plugin {
|
||||||
scriptedSbt := (sbtVersion in pluginCrossBuild).value,
|
scriptedSbt := (sbtVersion in pluginCrossBuild).value,
|
||||||
sbtLauncher <<= getJars(scriptedLaunchConf).map(_.get.head),
|
sbtLauncher <<= getJars(scriptedLaunchConf).map(_.get.head),
|
||||||
sbtTestDirectory := sourceDirectory.value / "sbt-test",
|
sbtTestDirectory := sourceDirectory.value / "sbt-test",
|
||||||
libraryDependencies ++= {
|
libraryDependencies ++= (partialVersion(scriptedSbt.value) match {
|
||||||
binarySbtVersion(scriptedSbt.value) match {
|
case Some((0, 13)) =>
|
||||||
case "0.13" =>
|
Seq(
|
||||||
Seq(
|
"org.scala-sbt" % "scripted-sbt" % scriptedSbt.value % scriptedConf.toString,
|
||||||
"org.scala-sbt" % "scripted-sbt" % scriptedSbt.value % scriptedConf.toString,
|
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % scriptedLaunchConf.toString
|
||||||
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % scriptedLaunchConf.toString
|
)
|
||||||
)
|
case Some((1, _)) =>
|
||||||
case sv if sv startsWith "1.0." =>
|
Seq(
|
||||||
Seq(
|
"org.scala-sbt" %% "scripted-sbt" % scriptedSbt.value % scriptedConf.toString,
|
||||||
"org.scala-sbt" %% "scripted-sbt" % scriptedSbt.value % scriptedConf.toString,
|
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % scriptedLaunchConf.toString
|
||||||
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % scriptedLaunchConf.toString
|
)
|
||||||
)
|
}),
|
||||||
}
|
|
||||||
},
|
|
||||||
scriptedBufferLog := true,
|
scriptedBufferLog := true,
|
||||||
scriptedClasspath := getJars(scriptedConf).value,
|
scriptedClasspath := getJars(scriptedConf).value,
|
||||||
scriptedTests <<= scriptedTestsTask,
|
scriptedTests <<= scriptedTestsTask,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue