mirror of https://github.com/sbt/sbt.git
Merge pull request #2725 from dwijnand/scriptless-1.0
[sbt 1.0] Configure scripted to do less
This commit is contained in:
commit
57a655478f
|
|
@ -219,7 +219,7 @@ lazy val sbtProj = (project in file("sbt")).
|
|||
|
||||
def scriptedTask: Def.Initialize[InputTask[Unit]] = Def.inputTask {
|
||||
val result = scriptedSource(dir => (s: State) => Scripted.scriptedParser(dir)).parsed
|
||||
publishAll.value
|
||||
publishLocalBinAll.value
|
||||
// These two projects need to be visible in a repo even if the default
|
||||
// local repository is hidden, so we publish them to an alternate location and add
|
||||
// that alternate repo to the running scripted test (in Scripted.scriptedpreScripted).
|
||||
|
|
@ -258,9 +258,8 @@ def otherRootSettings = Seq(
|
|||
scriptedSource := (sourceDirectory in sbtProj).value / "sbt-test",
|
||||
// scriptedPrescripted := { addSbtAlternateResolver _ },
|
||||
scriptedLaunchOpts := List("-XX:MaxPermSize=256M", "-Xmx1G"),
|
||||
publishAll := {
|
||||
val _ = (publishLocal).all(ScopeFilter(inAnyProject)).value
|
||||
},
|
||||
publishAll := { val _ = (publishLocal).all(ScopeFilter(inAnyProject)).value },
|
||||
publishLocalBinAll := { val _ = (publishLocalBin).all(ScopeFilter(inAnyProject)).value },
|
||||
aggregate in bintrayRelease := false
|
||||
) ++ inConfig(Scripted.RepoOverrideTest)(Seq(
|
||||
scriptedPrescripted := { _ => () },
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
import sbt._, Keys._
|
||||
|
||||
/** This local plugin provides ways of publishing just the binary jar. */
|
||||
object PublishBinPlugin extends AutoPlugin {
|
||||
override def requires = plugins.JvmPlugin
|
||||
override def trigger = allRequirements
|
||||
|
||||
object autoImport {
|
||||
val publishLocalBin = taskKey[Unit]("")
|
||||
val publishLocalBinConfig = taskKey[PublishConfiguration]("")
|
||||
}
|
||||
|
||||
import autoImport._
|
||||
|
||||
override def projectSettings = Def settings (
|
||||
publishLocalBin := Classpaths.publishTask(publishLocalBinConfig, deliverLocal).value,
|
||||
publishLocalBinConfig := Classpaths.publishConfig(
|
||||
(packagedArtifacts in publishLocalBin).value, Some(deliverLocal.value),
|
||||
(checksums in publishLocalBin).value, logging = ivyLoggingLevel.value, overwrite = isSnapshot.value),
|
||||
packagedArtifacts in publishLocalBin := Classpaths.packaged(Seq(packageBin in Compile)).value
|
||||
)
|
||||
}
|
||||
|
|
@ -20,6 +20,7 @@ object ScriptedPlugin extends sbt.AutoPlugin {
|
|||
|
||||
trait ScriptedKeys {
|
||||
lazy val publishAll = TaskKey[Unit]("publish-all")
|
||||
lazy val publishLocalBinAll = taskKey[Unit]("")
|
||||
lazy val scripted = InputKey[Unit]("scripted")
|
||||
lazy val scriptedUnpublished = InputKey[Unit]("scripted-unpublished", "Execute scripted without publishing SBT first. Saves you some time when only your test has changed.")
|
||||
lazy val scriptedSource = SettingKey[File]("scripted-source")
|
||||
|
|
|
|||
Loading…
Reference in New Issue