Merge pull request #30206 from jrudolph/avoid-assumptions-about-other-subproject

build: more reliable reference to protobuf jar
This commit is contained in:
Patrik Nordwall 2021-05-03 11:01:11 +02:00 committed by GitHub
commit 5de4942485
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 =
@ -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 := {