Skip to content

Commit

Permalink
build: more reliable reference to protobuf jar
Browse files Browse the repository at this point in the history
This avoids problems when the naming convention changes and also makes
sure the file has actually been generated.
  • Loading branch information
jrudolph committed Apr 29, 2021
1 parent 099e20e commit 2b56770
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions project/Protobuf.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import sbt._
import sbt.util.CacheStoreFactory
import Keys._

import sbtassembly.AssemblyKeys._

object Protobuf {
val paths = SettingKey[Seq[File]]("protobuf-paths", "The paths that contain *.proto files.")
val outputPaths =
Expand All @@ -29,8 +31,7 @@ object Protobuf {
outputPaths := Seq((sourceDirectory in Compile).value, (sourceDirectory in Test).value).map(_ / "java"),
importPath := None,
// this keeps intellij happy for files that use the shaded protobuf
Compile / unmanagedJars ++= Seq(
baseDirectory.value / ".." / "akka-protobuf-v3" / "target" / s"scala-${scalaBinaryVersion.value}" / s"akka-protobuf-v3-assembly-${version.value}.jar"),
Compile / unmanagedJars += (LocalProject("akka-protobuf-v3") / assembly).value,
protoc := "protoc",
protocVersion := "3.11.4",
generate := {
Expand Down

0 comments on commit 2b56770

Please sign in to comment.