title: Split a sbt multimodule project scala build file
body: <p>I have a multimodule sbt project, with a basic structure as follows:</p>
  
  <pre><code> - ProjectX
   -- project/ProjectXBuild.scala
   -- moduleA
   -- moduleB
   -- moduleC
   ...
  </code></pre>
  
  <p>Now project/ProjectXBuild.scala has all Project's defined as follows:</p>
  
  <pre><code>object ProjectXBuild extends Build {
    lazy val root: Project = Propject( .... ) aggregate(moduleA, moduleB, moduleC)
  
    lazy val moduleA: Project = Project(.....)
    lazy val moduleB: Project = Project(.....)
    ...
  </code></pre>
  
  <p>What I would like to do, is to move the val's moduleA and moduleB to a separate file because the ProjectXBuild object is getting huge. </p>
  
  <p>I can extract them to ModuleABuild.scala into the ProjectX/project directory. But I would like to move them to a separate package, e.g. ProjectX/project/modules. That doesn't work, sbt doesn't have any project/ subdirectory on it's compile classpath, it seems. </p>
  
  <p>I tried to change that using the recursive nature of sbt and appending a project/modules directory to the classpath in ProjectX/project/project/build.sbt file but I guess either I misunderstood the project/project purpose or I did it wrong.</p>
  
  <p><strong>To sum up, is it possible</strong> to extract "stuff" from project/MassiveBuildFile.scala to e.g. project/a/ModuleABuild.scala and project/b/ModuleBBuild.scala, etc?</p>
  
  <p>Thanks for any hints. I tried to look at various projects on github, but even <a href="https://github.com/sbt/sbt/blob/0.13/project/Sbt.scala" rel="nofollow">https://github.com/sbt/sbt/blob/0.13/project/Sbt.scala</a> is a huge blob of scala code, that seems a little bit unacceptable to me.</p>