mirror of https://github.com/sbt/sbt.git
comment subprojects in project definition
This commit is contained in:
parent
4b43e070ca
commit
5ab652f02d
|
|
@ -4,44 +4,77 @@ import java.io.File
|
||||||
|
|
||||||
class XSbt(info: ProjectInfo) extends ParentProject(info) with NoCrossPaths
|
class XSbt(info: ProjectInfo) extends ParentProject(info) with NoCrossPaths
|
||||||
{
|
{
|
||||||
/* Subproject declarations*/
|
/*** Subproject declarations ***/
|
||||||
|
|
||||||
|
// defines the Java interfaces through which the launcher and the launched application communicate
|
||||||
val launchInterfaceSub = project(launchPath / "interface", "Launcher Interface", new LaunchInterfaceProject(_))
|
val launchInterfaceSub = project(launchPath / "interface", "Launcher Interface", new LaunchInterfaceProject(_))
|
||||||
|
|
||||||
|
// the launcher. Retrieves, loads, and runs applications based on a configuration file.
|
||||||
val launchSub = project(launchPath, "Launcher", new LaunchProject(_), launchInterfaceSub)
|
val launchSub = project(launchPath, "Launcher", new LaunchProject(_), launchInterfaceSub)
|
||||||
|
|
||||||
|
// defines Java structures used across Scala versions, such as the API structures and relationships extracted by
|
||||||
|
// the analysis compiler phases and passed back to sbt. The API structures are defined in a simple
|
||||||
|
// format from which Java sources are generated by the datatype generator subproject
|
||||||
val interfaceSub = project("interface", "Interface", new InterfaceProject(_))
|
val interfaceSub = project("interface", "Interface", new InterfaceProject(_))
|
||||||
|
|
||||||
|
// defines operations on the API of a source, including determining whether it has changed and converting it to a string
|
||||||
val apiSub = baseProject(compilePath / "api", "API", interfaceSub)
|
val apiSub = baseProject(compilePath / "api", "API", interfaceSub)
|
||||||
|
|
||||||
// util
|
/***** Utilities *****/
|
||||||
|
|
||||||
val controlSub = baseProject(utilPath / "control", "Control")
|
val controlSub = baseProject(utilPath / "control", "Control")
|
||||||
val collectionSub = testedBase(utilPath / "collection", "Collections")
|
val collectionSub = testedBase(utilPath / "collection", "Collections")
|
||||||
|
// The API for forking, combining, and doing I/O with system processes
|
||||||
val processSub = project(utilPath / "process", "Process", new Base(_) with TestWithIO)
|
val processSub = project(utilPath / "process", "Process", new Base(_) with TestWithIO)
|
||||||
|
// Path, IO (formerly FileUtilities), NameFilter and other I/O utility classes
|
||||||
val ioSub = testedBase(utilPath / "io", "IO", controlSub)
|
val ioSub = testedBase(utilPath / "io", "IO", controlSub)
|
||||||
|
// Utilities related to reflection, managing Scala versions, and custom class loaders
|
||||||
val classpathSub = baseProject(utilPath / "classpath", "Classpath", launchInterfaceSub, ioSub)
|
val classpathSub = baseProject(utilPath / "classpath", "Classpath", launchInterfaceSub, ioSub)
|
||||||
|
// Command line-related utilities. Currently, history.
|
||||||
val completeSub = project(utilPath / "complete", "Completion", new InputProject(_), controlSub, ioSub)
|
val completeSub = project(utilPath / "complete", "Completion", new InputProject(_), controlSub, ioSub)
|
||||||
|
// logging
|
||||||
val logSub = project(utilPath / "log", "Logging", new LogProject(_), interfaceSub, processSub)
|
val logSub = project(utilPath / "log", "Logging", new LogProject(_), interfaceSub, processSub)
|
||||||
|
// class file reader and analyzer
|
||||||
val classfileSub = testedBase(utilPath / "classfile", "Classfile", ioSub, interfaceSub, logSub)
|
val classfileSub = testedBase(utilPath / "classfile", "Classfile", ioSub, interfaceSub, logSub)
|
||||||
|
// generates immutable or mutable Java data types according to a simple input format
|
||||||
val datatypeSub = baseProject(utilPath /"datatype", "Datatype Generator", ioSub)
|
val datatypeSub = baseProject(utilPath /"datatype", "Datatype Generator", ioSub)
|
||||||
|
// persisted, hierarchical properties
|
||||||
val envSub= baseProject(utilPath / "env", "Properties", ioSub, logSub, classpathSub)
|
val envSub= baseProject(utilPath / "env", "Properties", ioSub, logSub, classpathSub)
|
||||||
|
|
||||||
// intermediate-level modules
|
/***** Intermediate-level Modules *****/
|
||||||
|
|
||||||
|
// Apache Ivy integration
|
||||||
val ivySub = project("ivy", "Ivy", new IvyProject(_), interfaceSub, launchInterfaceSub, logSub, ioSub)
|
val ivySub = project("ivy", "Ivy", new IvyProject(_), interfaceSub, launchInterfaceSub, logSub, ioSub)
|
||||||
|
// Runner for uniform test interface
|
||||||
val testingSub = project("testing", "Testing", new TestingProject(_), ioSub, classpathSub, logSub)
|
val testingSub = project("testing", "Testing", new TestingProject(_), ioSub, classpathSub, logSub)
|
||||||
|
// Basic task engine
|
||||||
val taskSub = testedBase(tasksPath, "Tasks", controlSub, collectionSub)
|
val taskSub = testedBase(tasksPath, "Tasks", controlSub, collectionSub)
|
||||||
|
// Persisted caching based on SBinary
|
||||||
val cacheSub = project(cachePath, "Cache", new CacheProject(_), ioSub, collectionSub)
|
val cacheSub = project(cachePath, "Cache", new CacheProject(_), ioSub, collectionSub)
|
||||||
|
// Builds on cache to provide caching for filesystem-related operations
|
||||||
val trackingSub = baseProject(cachePath / "tracking", "Tracking", cacheSub, ioSub)
|
val trackingSub = baseProject(cachePath / "tracking", "Tracking", cacheSub, ioSub)
|
||||||
|
// Interface to Jetty
|
||||||
val webappSub = project("web", "Web App", new WebAppProject(_), ioSub, logSub, classpathSub, controlSub)
|
val webappSub = project("web", "Web App", new WebAppProject(_), ioSub, logSub, classpathSub, controlSub)
|
||||||
|
// Embedded Scala code runner
|
||||||
val runSub = baseProject("run", "Run", ioSub, logSub, classpathSub, processSub)
|
val runSub = baseProject("run", "Run", ioSub, logSub, classpathSub, processSub)
|
||||||
|
|
||||||
// compilation/discovery related modules
|
/***** compilation/discovery related modules *****/
|
||||||
|
|
||||||
|
// Compiler-side interface to compiler that is compiled against the compiler being used either in advance or on the fly.
|
||||||
|
// Includes API and Analyzer phases that extract source API and relationships.
|
||||||
val compileInterfaceSub = project(compilePath / "interface", "Compiler Interface", new CompilerInterfaceProject(_), interfaceSub)
|
val compileInterfaceSub = project(compilePath / "interface", "Compiler Interface", new CompilerInterfaceProject(_), interfaceSub)
|
||||||
|
// Implements the core functionality of detecting and propagating changes incrementally.
|
||||||
|
// Defines the data structures for representing file fingerprints and relationships and the overall source analysis
|
||||||
val compileIncrementalSub = testedBase(compilePath / "inc", "Incremental Compiler", collectionSub, apiSub, ioSub)
|
val compileIncrementalSub = testedBase(compilePath / "inc", "Incremental Compiler", collectionSub, apiSub, ioSub)
|
||||||
|
// Searches the source API data structures, currently looks for subclasses and annotations
|
||||||
val discoverySub = testedBase(compilePath / "discover", "Discovery", compileIncrementalSub, apiSub)
|
val discoverySub = testedBase(compilePath / "discover", "Discovery", compileIncrementalSub, apiSub)
|
||||||
|
// Persists the incremental data structures using SBinary
|
||||||
val compilePersistSub = project(compilePath / "persist", "Persist", new PersistProject(_), compileIncrementalSub, apiSub)
|
val compilePersistSub = project(compilePath / "persist", "Persist", new PersistProject(_), compileIncrementalSub, apiSub)
|
||||||
|
// sbt-side interface to compiler. Calls compiler-side interface reflectively
|
||||||
val compilerSub = project(compilePath, "Compile", new CompileProject(_),
|
val compilerSub = project(compilePath, "Compile", new CompileProject(_),
|
||||||
launchInterfaceSub, interfaceSub, ivySub, ioSub, classpathSub, compileInterfaceSub, logSub)
|
launchInterfaceSub, interfaceSub, ivySub, ioSub, classpathSub, compileInterfaceSub, logSub)
|
||||||
|
|
||||||
|
// mostly for implementing 'load' command, could perhaps be trimmed and merged into 'main'
|
||||||
val buildSub = baseProject("main" / "build", "Project Builder",
|
val buildSub = baseProject("main" / "build", "Project Builder",
|
||||||
classfileSub, classpathSub, compilePersistSub, compilerSub, compileIncrementalSub, interfaceSub, ivySub, launchInterfaceSub, logSub, discoverySub, processSub)
|
classfileSub, classpathSub, compilePersistSub, compilerSub, compileIncrementalSub, interfaceSub, ivySub, launchInterfaceSub, logSub, discoverySub, processSub)
|
||||||
|
|
||||||
|
|
@ -51,6 +84,7 @@ class XSbt(info: ProjectInfo) extends ParentProject(info) with NoCrossPaths
|
||||||
|
|
||||||
// Standard task system. This provides map, flatMap, join, and more on top of the basic task model.
|
// Standard task system. This provides map, flatMap, join, and more on top of the basic task model.
|
||||||
val stdTaskSub = testedBase(tasksPath / "standard", "Task System", taskSub, collectionSub, logSub, ioSub, processSub)
|
val stdTaskSub = testedBase(tasksPath / "standard", "Task System", taskSub, collectionSub, logSub, ioSub, processSub)
|
||||||
|
// The main integration project for sbt. It brings all of the subsystems together, configures them, and provides for overriding conventions.
|
||||||
val mainSub = baseProject("main", "Main",
|
val mainSub = baseProject("main", "Main",
|
||||||
buildSub, compileIncrementalSub, compilerSub, completeSub, discoverySub, ioSub, logSub, processSub, taskSub, stdTaskSub, runSub, trackingSub)
|
buildSub, compileIncrementalSub, compilerSub, completeSub, discoverySub, ioSub, logSub, processSub, taskSub, stdTaskSub, runSub, trackingSub)
|
||||||
// Strictly for bringing implicits and aliases from subsystems into the top-level sbt namespace through a single package object
|
// Strictly for bringing implicits and aliases from subsystems into the top-level sbt namespace through a single package object
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue