These are chat archives for trueaccord/ScalaPB

24th
Aug 2016
Alex Henning Johannessen
@ahjohannessen
Aug 24 2016 17:22

@thesamet I upgraded from 0.4.x to 0.5.38 with the following things set up in my project directory:

  • plugins.sbt:
addSbtPlugin("com.trueaccord.scalapb" % "sbt-scalapb" % "0.5.38")
  • scalapb.sbt:
libraryDependencies ++= Seq(
  "com.github.os72" % "protoc-jar" % "3.0.0"
)

In settings for a project with protobuf definitions:

  private val scalaPb = "com.trueaccord.scalapb" %% "scalapb-runtime" % "0.5.38"

  def protoSettings = PB.protobufSettings ++ Seq(

      PB.runProtoc in PB.protobufConfig := (args ⇒ runProtoc("-v300" +: args.toArray)),
    PB.flatPackage in PB.protobufConfig := true,

    unmanagedResourceDirectories in Compile +=
      baseDirectory.value / "src/main/protobuf",

    libraryDependencies ++=
      Seq(scalaPb, scalaPb % PB.protobufConfig)
  )

Somehow, I get this:

[warn] Here are some of the libraries that were evicted:
[warn]     * com.google.protobuf:protobuf-java:2.6.1 -> 3.0.0 (caller: com.trueaccord.scalapb:scalapb-runtime_2.11:0.5.38)

As far as I know, I am not pulling in 2.6.1 - Any idea why this happens?

Alex Henning Johannessen
@ahjohannessen
Aug 24 2016 17:35
@thesamet I think I found the issue, could you please upgrade sbt-scalapb plugin to use "com.github.gseitz" % "sbt-protobuf" % "0.5.3" ?