use 0.11.0 for building

This commit is contained in:
Mark Harrah 2011-09-26 08:20:07 -04:00
parent 479d163bc9
commit a2e30494fe
4 changed files with 21 additions and 16 deletions

View File

@ -148,12 +148,9 @@ object Sbt extends Build
lazy val scriptedSource = SettingKey[File]("scripted-source")
lazy val publishAll = TaskKey[Unit]("publish-all")
def deepTasks[T](scoped: ScopedTask[Seq[T]]): Initialize[Task[Seq[T]]] = deep(scoped.task).map { _.flatMap(_.join.map(_.flatten)) }
def deep[T](scoped: ScopedSetting[T]): Initialize[Task[Seq[T]]] =
state map { s =>
val sxrProjects = projects filterNot Set(root, sbtSub, scriptedBaseSub, scriptedSbtSub, scriptedPluginSub) map { p => LocalProject(p.id) }
Defaults.inAllProjects(sxrProjects, scoped, Project.extract(s).structure.data)
}
def deepTasks[T](scoped: ScopedTask[Seq[T]]): Initialize[Task[Seq[T]]] = deep(scoped.task) { _.join.map(_.flatten) }
def deep[T](scoped: ScopedSetting[T]): Initialize[Seq[T]] =
Util.inAllProjects(projects filterNot Set(root, sbtSub, scriptedBaseSub, scriptedSbtSub, scriptedPluginSub) map { p => LocalProject(p.id) }, scoped)
def launchSettings = inConfig(Compile)(Transform.configSettings) ++ Seq(jline, ivy, crossPaths := false,
compile in Test <<= compile in Test dependsOn(publishLocal in interfaceSub, publishLocal in testSamples, publishLocal in launchInterfaceSub)
@ -167,7 +164,7 @@ object Sbt extends Build
scripted <<= scriptedTask,
scriptedSource <<= (sourceDirectory in sbtSub) / "sbt-test",
sources in sxr <<= deepTasks(sources in Compile),
Sxr.sourceDirectories <<= deep(sourceDirectories in Compile).map(_.map(_.flatten)),
Sxr.sourceDirectories <<= deep(sourceDirectories in Compile).map(_.flatten),
fullClasspath in sxr <<= (externalDependencyClasspath in Compile in sbtSub).identity,
compileInputs in (Compile,sxr) <<= (sources in sxr, compileInputs in sbtSub in Compile, fullClasspath in sxr) map { (srcs, in, cp) =>
in.copy(config = in.config.copy(sources = srcs, classpath = cp.files))
@ -189,8 +186,9 @@ object Sbt extends Build
)
def precompiledSettings = Seq(
artifact in packageBin <<= scalaInstance in Compile apply { si =>
val bincID = binID + "_" + si.actualVersion
artifact in packageBin <<= (appConfiguration, scalaVersion) { (app, sv) =>
val launcher = app.provider.scalaProvider.launcher
val bincID = binID + "_" + ScalaInstance(sv, launcher).actualVersion
Artifact(binID) extra("e:component" -> bincID)
},
target <<= (target, scalaVersion) { (base, sv) => base / ("precompiled_" + sv) },

View File

@ -6,14 +6,21 @@ object Util
{
lazy val componentID = SettingKey[Option[String]]("component-id")
def inAll(projects: => Seq[ProjectReference], key: ScopedSetting[Task[Unit]]) =
state flatMap { s => nop dependsOn( Defaults.inAllProjects(projects, key, Project.extract(s).structure.data) : _*) }
def inAll(projects: => Seq[ProjectReference], key: ScopedSetting[Task[Unit]]): Project.Initialize[Task[Unit]] =
inAllProjects(projects, key) { deps => nop dependsOn( deps : _*) }
def inAllProjects[T](projects: => Seq[ProjectReference], key: ScopedSetting[T]): Project.Initialize[Seq[T]] =
Project.bind( (loadedBuild, thisProjectRef).identity ) { case (lb, pr) =>
def resolve(ref: ProjectReference): ProjectRef = Scope.resolveProjectRef(pr.build, Load.getRootProject(lb.units), ref)
val refs = projects flatMap { base => Defaults.transitiveDependencies(resolve(base.project), lb, includeRoot=true, classpath=true, aggregate=true) }
refs map ( ref => (key in ref).? ) joinWith(_ flatMap { x => x})
}
def noPublish(p: Project) = p.copy(settings = noRemotePublish(p.settings))
def noRemotePublish(in: Seq[Setting[_]]) = in filterNot { s => s.key == deliver || s.key == publish }
lazy val noExtra = projectDependencies ~= { _.map(_.copy(extraAttributes = Map.empty)) } // remove after 0.10.2
def project(path: File, nameString: String) = Project(normalize(nameString), path) settings( name := nameString, noExtra )
def project(path: File, nameString: String) = Project(normalize(nameString), path) settings( name := nameString )
def baseProject(path: File, nameString: String) = project(path, nameString) settings( base : _*)
def testedBaseProject(path: File, nameString: String) = baseProject(path, nameString) settings( testDependencies : _*)

View File

@ -1 +1 @@
sbt.version=0.10.1
sbt.version=0.11.0

View File

@ -1 +1 @@
libraryDependencies += "net.databinder" %% "dispatch-http" % "0.8.3"
libraryDependencies += "net.databinder" %% "dispatch-http" % "0.8.5"