mirror of https://github.com/sbt/sbt.git
commit
c6036d956a
|
|
@ -27,7 +27,7 @@ private[sbt] object SettingCompletions {
|
|||
{
|
||||
import extracted._
|
||||
val r = relation(extracted.structure, true)
|
||||
val allDefs = r._1s.toSeq
|
||||
val allDefs = Def.flattenLocals(Def.compiled(extracted.structure.settings, true)(structure.delegates, structure.scopeLocal, implicitly[Show[ScopedKey[_]]])).map(_._1)
|
||||
val projectScope = Load.projectScope(currentRef)
|
||||
def resolve(s: Setting[_]): Seq[Setting[_]] = Load.transformSettings(projectScope, currentRef.build, rootProject, s :: Nil)
|
||||
def rescope[T](setting: Setting[T]): Seq[Setting[_]] =
|
||||
|
|
@ -353,4 +353,4 @@ private[sbt] object SettingCompletions {
|
|||
classOf[Long],
|
||||
classOf[String]
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
val a = project.settings(version := "2.8.1")
|
||||
|
||||
val trySetEvery = taskKey[Unit]("Tests \"set every\"")
|
||||
|
||||
trySetEvery := {
|
||||
val s = state.value
|
||||
val extracted = Project.extract(s)
|
||||
import extracted._
|
||||
val allProjs = structure.allProjectRefs
|
||||
val Some(aProj) = allProjs.find(_.project == "a")
|
||||
val aVer = (version in aProj get structure.data).get
|
||||
if (aVer != "1.0") {
|
||||
println("Version of project a: " + aVer + ", expected: 1.0")
|
||||
error("\"set every\" did not change the version of all projects.")
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
> set every version := '"1.0"'
|
||||
> trySetEvery
|
||||
|
||||
Loading…
Reference in New Issue