mirror of https://github.com/sbt/sbt.git
cleaning up scripted test
This commit is contained in:
parent
33de2221f7
commit
eeddaa3f5d
|
|
@ -2,28 +2,26 @@
|
|||
{
|
||||
def writePluginsSbt(str: String) = {
|
||||
val pluginsSbt = file(".") / "project" / "plugins.sbt"
|
||||
if (!pluginsSbt.exists)
|
||||
IO.write(
|
||||
pluginsSbt,
|
||||
s"""$str
|
||||
|addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.8")
|
||||
|""".stripMargin
|
||||
)
|
||||
if (!pluginsSbt.exists)
|
||||
IO.write(
|
||||
pluginsSbt,
|
||||
s"""$str
|
||||
|addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.8")
|
||||
|""".stripMargin
|
||||
)
|
||||
}
|
||||
sys.props.get("dependency.resolution") match {
|
||||
val dr = sys.props.get("dependency.resolution") match {
|
||||
case Some("ivy") =>
|
||||
writePluginsSbt("""dependencyResolution := sbt.librarymanagement.ivy.IvyDependencyResolution(ivyConfiguration.value)""")
|
||||
addCommandAlias(
|
||||
"setDependencyResolution",
|
||||
"""set dependencyResolution := sbt.librarymanagement.ivy.IvyDependencyResolution(ivyConfiguration.value)"""
|
||||
)
|
||||
"""dependencyResolution := sbt.librarymanagement.ivy.IvyDependencyResolution(ivyConfiguration.value)"""
|
||||
case Some("coursier") =>
|
||||
writePluginsSbt("""dependencyResolution := sbt.librarymanagement.coursier.CoursierDependencyResolution(sbt.librarymanagement.coursier.CoursierConfiguration())""")
|
||||
addCommandAlias(
|
||||
"setDependencyResolution",
|
||||
"""set dependencyResolution := sbt.librarymanagement.coursier.CoursierDependencyResolution(sbt.librarymanagement.coursier.CoursierConfiguration())"""
|
||||
)
|
||||
"""dependencyResolution := sbt.librarymanagement.coursier.CoursierDependencyResolution(sbt.librarymanagement.coursier.CoursierConfiguration())"""
|
||||
case _ => sys.error("""|The system property 'dependency.resolution' is not defined.
|
||||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
|
||||
}
|
||||
|
||||
writePluginsSbt(dr)
|
||||
addCommandAlias(
|
||||
"setDependencyResolution",
|
||||
s"""set $dr"""
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,2 @@
|
|||
> reload
|
||||
> sbtVersion
|
||||
> setDependencyResolution
|
||||
> clean
|
||||
> compile
|
||||
> assembly
|
||||
|
|
|
|||
|
|
@ -1,4 +1 @@
|
|||
> sbtVersion
|
||||
> setDependencyResolution
|
||||
> clean
|
||||
> compile
|
||||
|
|
|
|||
|
|
@ -1,4 +1 @@
|
|||
> sbtVersion
|
||||
> setDependencyResolution
|
||||
> clean
|
||||
> compile
|
||||
|
|
|
|||
Loading…
Reference in New Issue