Skip to content

Commit

Permalink
Add protobuf-java dependency, and explicitly declare those deps wit…
Browse files Browse the repository at this point in the history
…h TODOs for relevant tickets.
  • Loading branch information
stuhood committed May 26, 2022
1 parent 3f8894b commit 6fdd882
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
5 changes: 5 additions & 0 deletions 3rdparty/jvm/com/google/protobuf/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
jvm_artifact(
group="com.google.protobuf",
artifact="protobuf-java",
version="3.21.0",
)
14 changes: 14 additions & 0 deletions 3rdparty/jvm/default.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# "version": 1,
# "generated_with_requirements": [
# "com.google.guava:guava:31.0.1-jre,url=not_provided,jar=not_provided",
# "com.google.protobuf:protobuf-java:3.21.0,url=not_provided,jar=not_provided",
# "com.lihaoyi:acyclic_2.13:0.2.1,url=not_provided,jar=not_provided",
# "org.scala-lang:scala-library:2.13.8,url=not_provided,jar=not_provided",
# "org.scalatest:scalatest_2.13:3.2.10,url=not_provided,jar=not_provided"
Expand Down Expand Up @@ -165,6 +166,19 @@ serialized_bytes_length = 8781
[[entries]]
directDependencies = []
dependencies = []
file_name = "com.google.protobuf_protobuf-java_3.21.0.jar"

[entries.coord]
group = "com.google.protobuf"
artifact = "protobuf-java"
version = "3.21.0"
packaging = "jar"
[entries.file_digest]
fingerprint = "3d6bc9e4a87f293cb434b5a95c3011f72881a8517270c231dee035b215eb61df"
serialized_bytes_length = 1692588
[[entries]]
directDependencies = []
dependencies = []
file_name = "com.lihaoyi_acyclic_2.13_0.2.1.jar"

[entries.coord]
Expand Down
4 changes: 4 additions & 0 deletions src/jvm/org/pantsbuild/example/lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ java_sources(
# Resource dependencies cannot be inferred, so we must explicitly declare that we
# depend on them.
"src/resources/org/pantsbuild/example/lib",
# TODO: Protobuf dependencies are not currently inferred.
# see https://github.com/pantsbuild/pants/issues/14960
"src/jvm/org/pantsbuild/example/proto",
"3rdparty/jvm/com/google/protobuf",
],
)
8 changes: 7 additions & 1 deletion src/jvm/org/pantsbuild/example/proto/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
protobuf_sources(grpc=True)
protobuf_sources(
dependencies=[
# TODO: The protobuf runtime is not automatically injected as a dependency of protobuf targets.
# see https://github.com/pantsbuild/pants/pull/15006.
"3rdparty/jvm/com/google/protobuf",
],
)

0 comments on commit 6fdd882

Please sign in to comment.