title: Add Multiple scalapb Source Directories to Multi-Project SBT Build
body: <p>I'm having some difficulties understanding the syntax for scalapb, specifically I'm trying to add multiple .proto source directories for a multi-project SBT build.</p>
  
  <p>My project structure is as follows:</p>
  
  <pre><code>/build.sbt
  /main/src/protobuf
  /common/main/src/protobuf
  /client/main/src/protobuf
  </code></pre>
  
  <p>My build.sbt is as follows:</p>
  
  <pre><code>name := "myApp"
  
  import Dependencies._
  
  import com.trueaccord.scalapb.{ScalaPbPlugin =&gt; PB}
  
  val protoDirectories = Seq(
    file("common/src/main/protobuf"),
    file("client/src/main/protobuf")
  )
  
  sourceDirectories in PB.protobufConfig ++= protoDirectories
  
  PB.protobufSettings ++ Seq(
    flatPackage := false
  )
  
  lazy val common = (project in file("common")).
    settings(Commons.settings: _*).
    settings(libraryDependencies ++= commonDependencies)
  
  lazy val client = (project in file("client")).
    settings(Commons.settings: _*).
    settings(libraryDependencies ++= clientDependencies).
    dependsOn(common)
  </code></pre>
  
  <p>When I run <code>sbt compile</code>, I get the following error message:</p>
  
  <pre><code>[error] Reference to undefined setting: 
  [error] 
  [error]   sphere/*:sourceDirectories from myApp/*:sourceDirectories (&lt;path_to_project_dir&gt;\build.sbt:11)
  [error]      Did you mean myApp/protobuf:sourceDirectories ?
  </code></pre>
  
  <p>Could someone please point me in the right direction? I'm failing to understand some basic concept here...</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Ok, so I was pointing to the wrong sequence for the protoDirectories. I have amended the build.sbt to reflect the new changes. I still have a problem that my .proto files are not compiled in the sub projects. If I move my .proto files to the root /main/src/protobuf, they compile just fine.</p>