diff --git a/sbt/project/build/SbtProject.scala b/project/build/SbtProject.scala similarity index 90% rename from sbt/project/build/SbtProject.scala rename to project/build/SbtProject.scala index 8edb601be..823aee142 100644 --- a/sbt/project/build/SbtProject.scala +++ b/project/build/SbtProject.scala @@ -6,7 +6,7 @@ import sbt._ import java.io.File import java.net.URL -class SbtProject(info: ProjectInfo) extends DefaultProject(info) with test.SbtScripted with posterous.Publish +abstract class SbtProject(info: ProjectInfo) extends DefaultProject(info) with test.SbtScripted with posterous.Publish { /* Additional resources to include in the produced jar.*/ def extraResources = descendents(info.projectPath / "licenses", "*") +++ "LICENSE" +++ "NOTICE" @@ -46,9 +46,8 @@ class SbtProject(info: ProjectInfo) extends DefaultProject(info) with test.SbtSc val testInterface = "org.scala-tools.testing" % "test-interface" % "0.4" - // xsbt components - val xsbti = "org.scala-tools.sbt" % "launcher-interface" % projectVersion.value.toString % "provided" - val compiler = "org.scala-tools.sbt" %% "compile" % projectVersion.value.toString + def deepSources = Path.finder { topologicalSort.flatMap { case p: ScalaPaths => p.mainSources.getFiles } } + lazy val sbtDoc = scaladocTask("sbt", deepSources, docPath, docClasspath, documentOptions) /* For generating JettyRun for Jetty 6 and 7. The only difference is the imports, but the file has to be compiled against each set of imports. */ override def compileAction = super.compileAction dependsOn (generateJettyRun6, generateJettyRun7) diff --git a/project/build/XSbt.scala b/project/build/XSbt.scala index d1eaf65bb..93c06a1fe 100644 --- a/project/build/XSbt.scala +++ b/project/build/XSbt.scala @@ -34,6 +34,8 @@ class XSbt(info: ProjectInfo) extends ParentProject(info) with NoCrossPaths val altCompilerSub = baseProject("main", "Alternate Compiler Test", stdTaskSub, logSub) + val sbtSub = project("sbt", "Simple Build Tool", new SbtProject(_) {}, compilerSub, launchInterfaceSub) + def baseProject(path: Path, name: String, deps: Project*) = project(path, name, new Base(_), deps : _*) /* Multi-subproject paths */ @@ -158,7 +160,7 @@ class XSbt(info: ProjectInfo) extends ParentProject(info) with NoCrossPaths /** compiles the generated sources */ override def compileAction = super.compileAction dependsOn(generateSource) } - class LaunchInterfaceProject(info: ProjectInfo) extends BaseInterfaceProject(info) + class LaunchInterfaceProject(info: ProjectInfo) extends BaseInterfaceProject(info) { override def componentID = None } diff --git a/sbt/project/plugins/Plugins.scala b/project/plugins/Plugins.scala similarity index 100% rename from sbt/project/plugins/Plugins.scala rename to project/plugins/Plugins.scala diff --git a/sbt/project/build.properties b/sbt/project/build.properties deleted file mode 100644 index d8b0d7a53..000000000 --- a/sbt/project/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -project.name=Simple Build Tool -project.organization=org.scala-tools.sbt -project.version=0.7.2-SNAPSHOT -sbt.version=0.7.1 -def.scala.version=2.7.7 -build.scala.versions=2.7.7 diff --git a/sbt/src/main/scala/sbt/Project.scala b/sbt/src/main/scala/sbt/Project.scala index 6555f72d4..aaf86eec4 100644 --- a/sbt/src/main/scala/sbt/Project.scala +++ b/sbt/src/main/scala/sbt/Project.scala @@ -17,7 +17,7 @@ trait Project extends TaskManager with Dag[Project] with BasicEnvironment final val log: Logger = logImpl protected def logImpl: Logger = { - val lg = new BufferedLogger(info.logger) + val lg = new FilterLogger(new BufferedLogger(info.logger)) lg.setLevel(defaultLoggingLevel) lg } @@ -147,7 +147,7 @@ trait Project extends TaskManager with Dag[Project] with BasicEnvironment /** Loads the project at the given path and declares the project to have the given * dependencies. This method will configure the project according to the * project/ directory in the directory denoted by path.*/ - def project(path: Path, deps: Project*): Project = getProject(Project.loadProject(path, deps, Some(this), log, info.app, info.buildScalaVersion), path) + def project(path: Path, deps: Project*): Project = getProject(Project.loadProject(path, deps, Some(this), info.logger, info.app, info.buildScalaVersion), path) /** Loads the project at the given path using the given name and inheriting this project's version. * The builder class is the default builder class, sbt.DefaultProject. The loaded project is declared @@ -166,7 +166,7 @@ trait Project extends TaskManager with Dag[Project] with BasicEnvironment * The construct function is used to obtain the Project instance. Any project/build/ directory for the project * is ignored. The project is declared to have the dependencies given by deps.*/ def project[P <: Project](path: Path, name: String, construct: ProjectInfo => P, deps: Project*): P = - initialize(construct(ProjectInfo(path.asFile, deps, Some(this))(log, info.app, info.buildScalaVersion)), Some(new SetupInfo(name, None, None, false)), log) + initialize(construct(ProjectInfo(path.asFile, deps, Some(this))(info.logger, info.app, info.buildScalaVersion)), Some(new SetupInfo(name, None, None, false)), log) /** Initializes the project directories when a user has requested that sbt create a new project.*/ def initializeDirectories() {} diff --git a/sbt/src/main/scala/sbt/ProjectInfo.scala b/sbt/src/main/scala/sbt/ProjectInfo.scala index 6ff3fcc02..beb071478 100644 --- a/sbt/src/main/scala/sbt/ProjectInfo.scala +++ b/sbt/src/main/scala/sbt/ProjectInfo.scala @@ -23,7 +23,7 @@ final case class ProjectInfo(projectDirectory: File, dependencies: Iterable[Proj /** The launcher instance that booted sbt.*/ def launcher = app.scalaProvider.launcher - val logger = new FilterLogger(log) + val logger = log /** The base path for the project, preserving information to the root project directory.*/ val projectPath: Path = {