在build.sbt中无法识别ScalaPB

时间:2016-06-15 17:33:44

标签: scala sbt protocol-buffers scalapb

按照scalaPB的说明,我已将文件project/scalapb.sbt添加到我的intelli j项目中。这是文件本身 addSbtPlugin(“com.trueaccord.scalapb”%“sbt-scalapb”%“0.4.20”)

libraryDependencies ++= Seq(
  "com.trueaccord.scalapb" %% "compilerplugin" % "0.4.20",
  "com.github.os72" % "protoc-jar" % "3.0.0-b2.1"
)

我已将以下几行添加到build.sbt

import com.trueaccord.scalapb.{ScalaPbPlugin => PB}
PB.protobufSettings
PB.runProtoc in PB.protobufConfig := (args =>
  com.github.os72.protocjar.Protoc.runProtoc("-v241" +: args.toArray))

我遇到的问题是,当intelli j尝试刷新sbt构建时,它会显示以下消息:illegal start of simple expression import com.trueaccord.scalapb.{ScalapbPlugin => PB}

0 个答案:

没有答案