mirror of https://github.com/sbt/sbt.git
psuedo-unique default ID to avoid collisions in simple cases
This commit is contained in:
parent
aebde6b3e6
commit
6e1c41af64
|
|
@ -28,7 +28,9 @@ trait Plugin
|
|||
|
||||
object Build
|
||||
{
|
||||
val default: Build = new Build { override def projectDefinitions(base: File) = Project("default", base) :: Nil }
|
||||
val default: Build = new Build { override def projectDefinitions(base: File) = defaultProject(base) :: Nil }
|
||||
def defaultID(base: File): String = "default-" + Hash.halfHashString(base.getAbsolutePath)
|
||||
def defaultProject(base: File): Project = Project(defaultID(base), base).settings(Keys.organization := "default")
|
||||
|
||||
def data[T](in: Seq[Attributed[T]]): Seq[T] = in.map(_.data)
|
||||
def analyzed(in: Seq[Attributed[_]]): Seq[inc.Analysis] = in.flatMap{ _.metadata.get(Keys.analysis) }
|
||||
|
|
|
|||
Loading…
Reference in New Issue