Generate both Java and Scala classes using Protocol Buffers in ScalaPB
<p>I have been using <a href="https://github.com/sbt/sbt-protobuf" rel="nofollow">sbt-protobuf</a> to generate Java classes from proto definition files. I now want to generate Scala classes as well. To do that, I try to use the <a href="https://github.com/trueaccord/ScalaPB" rel="nofollow">ScalaPB</a> plugin. The goal is to have one <code>src/main/protobuf/</code> directory in the project and generate both Java and Scala classes from those definitions.    </p>

<p>The problem is that when I add the ScalaPB dependency in my project it stops generating the Java classes (it only generate Scala case classes). </p>

<p>In fact, trying to modify any traditional sbt-protobuf settings, always results in this (or similar) error message: </p>

<pre><code>build.sbt:YYY: error: reference to protocOptions is ambiguous;
it is imported twice in the same scope by
import _root_.sbtprotobuf.ProtobufPlugin._
and import _root_.com.trueaccord.scalapb.ScalaPbPlugin._
    protocOptions in SPB.protobufConfig ++= Seq(..)
</code></pre>

<p>I am not sure if these two issues are related. The idea was to change the <code>protocOptions</code> to enforce the generation of the Java classes. </p>