2009-08-16 20:29:08 +02:00
|
|
|
import sbt._
|
|
|
|
|
|
|
|
|
|
class XSbt(info: ProjectInfo) extends ParentProject(info)
|
|
|
|
|
{
|
|
|
|
|
def utilPath = path("util")
|
2009-08-17 16:51:43 +02:00
|
|
|
def compilePath = path("compile")
|
|
|
|
|
|
|
|
|
|
val commonDeps = project("common", "Dependencies", new CommonDependencies(_))
|
|
|
|
|
val interfaceSub = project("interface", "Interface", new InterfaceProject(_))
|
2009-08-16 20:29:08 +02:00
|
|
|
|
|
|
|
|
val controlSub = project(utilPath / "control", "Control", new Base(_))
|
|
|
|
|
val collectionSub = project(utilPath / "collection", "Collections", new Base(_))
|
2009-08-17 16:51:43 +02:00
|
|
|
val ioSub = project(utilPath / "io", "IO", new Base(_), controlSub, commonDeps)
|
2009-08-16 20:29:08 +02:00
|
|
|
val classpathSub = project(utilPath / "classpath", "Classpath", new Base(_))
|
|
|
|
|
|
2009-08-17 16:51:43 +02:00
|
|
|
val analysisPluginSub = project(compilePath / "plugin", "Analyzer Compiler Plugin", new Base(_), interfaceSub)
|
|
|
|
|
val compilerInterfaceSub = project(compilePath / "interface", "Compiler Interface", new Base(_), interfaceSub)
|
|
|
|
|
|
2009-08-16 20:29:08 +02:00
|
|
|
val ivySub = project("ivy", "Ivy", new IvyProject(_))
|
|
|
|
|
val logSub = project(utilPath / "log", "Logging", new Base(_))
|
|
|
|
|
|
2009-08-17 16:51:43 +02:00
|
|
|
val taskSub = project("tasks", "Tasks", new TaskProject(_), controlSub, collectionSub, commonDeps)
|
2009-08-16 20:29:08 +02:00
|
|
|
val cacheSub = project("cache", "Cache", new CacheProject(_), taskSub, ioSub)
|
2009-08-17 16:51:43 +02:00
|
|
|
val compilerSub = project(compilePath, "Compile", new Base(_), interfaceSub, ivySub, analysisPluginSub, ioSub, compilerInterfaceSub)
|
2009-08-16 20:29:08 +02:00
|
|
|
|
2009-08-17 16:51:43 +02:00
|
|
|
class CommonDependencies(info: ProjectInfo) extends ParentProject(info)
|
2009-08-16 20:29:08 +02:00
|
|
|
{
|
|
|
|
|
val sc = "org.scala-tools.testing" % "scalacheck" % "1.5" % "test->default"
|
|
|
|
|
}
|
2009-08-17 16:51:43 +02:00
|
|
|
|
|
|
|
|
override def parallelExecution = true
|
|
|
|
|
class TaskProject(info: ProjectInfo) extends Base(info)
|
2009-08-16 20:29:08 +02:00
|
|
|
class CacheProject(info: ProjectInfo) extends Base(info)
|
|
|
|
|
{
|
|
|
|
|
//override def compileOptions = super.compileOptions ++ List(Unchecked,ExplainTypes, CompileOption("-Xlog-implicits"))
|
|
|
|
|
}
|
|
|
|
|
class Base(info: ProjectInfo) extends DefaultProject(info) with AssemblyProject
|
|
|
|
|
{
|
|
|
|
|
override def scratch = true
|
|
|
|
|
}
|
|
|
|
|
class IvyProject(info: ProjectInfo) extends Base(info)
|
|
|
|
|
{
|
|
|
|
|
val ivy = "org.apache.ivy" % "ivy" % "2.0.0"
|
|
|
|
|
}
|
2009-08-17 16:51:43 +02:00
|
|
|
class InterfaceProject(info: ProjectInfo) extends DefaultProject(info)
|
|
|
|
|
{
|
|
|
|
|
override def sourceExtensions: NameFilter = "*.java"
|
|
|
|
|
override def compileOrder = CompileOrder.JavaThenScala
|
|
|
|
|
}
|
2009-08-16 20:29:08 +02:00
|
|
|
}
|