#Scala: vol2: 【akka-grpcでgoogle/protobuf/*.proto をimportする方法】
問題
akka-grpcで開発時に、
google/protobuf/*.proto
のimportができずに、
sbt-console
Import "google/protobuf/timestamp.proto" was not found or had errors
"google.protobuf.Timestamp" is not defined.
となってしまったので、その解決策についてご紹介します。
解決策
Find the ones you need in protocolbuffers/protobuf:src/google/protobuf@master , download and put them alongside your projects' .proto resources
ダウンロードして、プロジェクトの.protoリソースと並べて配置
と書いてありましたが、 もっと簡単に対応可能です。
build.sbt に以下を追加すれば解決です。
libraryDependencies ++= Seq(
"com.google.protobuf" % "protobuf-java" % "3.6.1" % "protobuf"
)