mirror of https://github.com/sbt/sbt.git
use 0.11.0 for building
This commit is contained in:
parent
479d163bc9
commit
a2e30494fe
|
|
@ -148,12 +148,9 @@ object Sbt extends Build
|
||||||
lazy val scriptedSource = SettingKey[File]("scripted-source")
|
lazy val scriptedSource = SettingKey[File]("scripted-source")
|
||||||
lazy val publishAll = TaskKey[Unit]("publish-all")
|
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 deepTasks[T](scoped: ScopedTask[Seq[T]]): Initialize[Task[Seq[T]]] = deep(scoped.task) { _.join.map(_.flatten) }
|
||||||
def deep[T](scoped: ScopedSetting[T]): Initialize[Task[Seq[T]]] =
|
def deep[T](scoped: ScopedSetting[T]): Initialize[Seq[T]] =
|
||||||
state map { s =>
|
Util.inAllProjects(projects filterNot Set(root, sbtSub, scriptedBaseSub, scriptedSbtSub, scriptedPluginSub) map { p => LocalProject(p.id) }, scoped)
|
||||||
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 launchSettings = inConfig(Compile)(Transform.configSettings) ++ Seq(jline, ivy, crossPaths := false,
|
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)
|
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,
|
scripted <<= scriptedTask,
|
||||||
scriptedSource <<= (sourceDirectory in sbtSub) / "sbt-test",
|
scriptedSource <<= (sourceDirectory in sbtSub) / "sbt-test",
|
||||||
sources in sxr <<= deepTasks(sources in Compile),
|
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,
|
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) =>
|
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))
|
in.copy(config = in.config.copy(sources = srcs, classpath = cp.files))
|
||||||
|
|
@ -189,8 +186,9 @@ object Sbt extends Build
|
||||||
)
|
)
|
||||||
|
|
||||||
def precompiledSettings = Seq(
|
def precompiledSettings = Seq(
|
||||||
artifact in packageBin <<= scalaInstance in Compile apply { si =>
|
artifact in packageBin <<= (appConfiguration, scalaVersion) { (app, sv) =>
|
||||||
val bincID = binID + "_" + si.actualVersion
|
val launcher = app.provider.scalaProvider.launcher
|
||||||
|
val bincID = binID + "_" + ScalaInstance(sv, launcher).actualVersion
|
||||||
Artifact(binID) extra("e:component" -> bincID)
|
Artifact(binID) extra("e:component" -> bincID)
|
||||||
},
|
},
|
||||||
target <<= (target, scalaVersion) { (base, sv) => base / ("precompiled_" + sv) },
|
target <<= (target, scalaVersion) { (base, sv) => base / ("precompiled_" + sv) },
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,21 @@ object Util
|
||||||
{
|
{
|
||||||
lazy val componentID = SettingKey[Option[String]]("component-id")
|
lazy val componentID = SettingKey[Option[String]]("component-id")
|
||||||
|
|
||||||
def inAll(projects: => Seq[ProjectReference], key: ScopedSetting[Task[Unit]]) =
|
def inAll(projects: => Seq[ProjectReference], key: ScopedSetting[Task[Unit]]): Project.Initialize[Task[Unit]] =
|
||||||
state flatMap { s => nop dependsOn( Defaults.inAllProjects(projects, key, Project.extract(s).structure.data) : _*) }
|
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 noPublish(p: Project) = p.copy(settings = noRemotePublish(p.settings))
|
||||||
def noRemotePublish(in: Seq[Setting[_]]) = in filterNot { s => s.key == deliver || s.key == publish }
|
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 baseProject(path: File, nameString: String) = project(path, nameString) settings( base : _*)
|
||||||
def testedBaseProject(path: File, nameString: String) = baseProject(path, nameString) settings( testDependencies : _*)
|
def testedBaseProject(path: File, nameString: String) = baseProject(path, nameString) settings( testDependencies : _*)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
sbt.version=0.10.1
|
sbt.version=0.11.0
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
libraryDependencies += "net.databinder" %% "dispatch-http" % "0.8.3"
|
libraryDependencies += "net.databinder" %% "dispatch-http" % "0.8.5"
|
||||||
Loading…
Reference in New Issue