2009-06-26 03:26:06 +02:00
|
|
|
/* sbt -- Simple Build Tool
|
|
|
|
|
* Copyright 2008, 2009 Mark Harrah
|
|
|
|
|
*/
|
|
|
|
|
import sbt._
|
|
|
|
|
|
|
|
|
|
import java.io.File
|
|
|
|
|
|
2009-09-12 18:55:04 +02:00
|
|
|
class SbtProject(info: ProjectInfo) extends ParentProject(info) with ReleaseProject
|
2009-06-26 03:26:06 +02:00
|
|
|
{
|
|
|
|
|
// Launcher sub project.
|
|
|
|
|
lazy val boot = project("boot", "Simple Build Tool Loader", new LoaderProject(_))
|
|
|
|
|
// Main builder sub project
|
|
|
|
|
lazy val main = project(info.projectPath, "Simple Build Tool", new MainProject(_))
|
|
|
|
|
// One-shot build for users building from trunk
|
|
|
|
|
lazy val fullBuild = task { None } dependsOn(boot.proguard, main.crossPublishLocal) describedAs
|
|
|
|
|
"Builds the loader and builds main sbt against all supported versions of Scala and installs to the local repository."
|
|
|
|
|
|
|
|
|
|
override def shouldCheckOutputDirectories = false
|
|
|
|
|
override def baseUpdateOptions = QuietUpdate :: Nil
|
|
|
|
|
|
2009-07-07 03:16:18 +02:00
|
|
|
//override def parallelExecution = true
|
2009-06-26 03:26:06 +02:00
|
|
|
override def deliverLocalAction = noAction
|
|
|
|
|
private def noAction = task { None }
|
|
|
|
|
override def publishLocalAction = noAction
|
|
|
|
|
}
|
|
|
|
|
|
2009-07-27 04:34:38 +02:00
|
|
|
protected class MainProject(val info: ProjectInfo) extends CrossCompileProject with test.SbtScripted
|
2009-06-26 03:26:06 +02:00
|
|
|
{
|
|
|
|
|
override def defaultJarBaseName = "sbt_" + version.toString
|
|
|
|
|
/** Additional resources to include in the produced jar.*/
|
|
|
|
|
def extraResources = descendents(info.projectPath / "licenses", "*") +++ "LICENSE" +++ "NOTICE"
|
|
|
|
|
override def mainResources = super.mainResources +++ extraResources
|
|
|
|
|
override def mainClass = Some("sbt.Main")
|
|
|
|
|
override def testOptions = ExcludeTests("sbt.ReflectiveSpecification" :: "sbt.ProcessSpecification" :: Nil) :: super.testOptions.toList
|
2009-07-07 03:16:18 +02:00
|
|
|
override def scriptedDependencies = testCompile :: `package` :: Nil
|
2009-09-12 18:55:04 +02:00
|
|
|
override lazy val release = task { None }
|
2009-06-26 03:26:06 +02:00
|
|
|
}
|