summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Zi Wang <mrziwang@google.com> 2023-09-13 10:06:54 -0700
committer Zi Wang <mrziwang@google.com> 2023-09-13 10:15:10 -0700
commitf038cde8df5623a11c0a198378650684e7388080 (patch)
tree13e8f8d9312c2fcbab784403d5aa2491213893ea /java/java.go
parentef1fc04e1a60a59f6b87e4455f211fd50b9ec8cb (diff)
Do not append deps to exports when java_library has only proto srcs
This is to address the comment in aosp/2748099 Test: CI Bug: 285952385 Change-Id: I0bc8c76e2bc9ee113ced8642e0ab93a95799211c
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/java/java.go b/java/java.go
index 270f45615..3567dbead 100644
--- a/java/java.go
+++ b/java/java.go
@@ -3143,9 +3143,7 @@ func javaLibraryBp2Build(ctx android.TopDownMutatorContext, m *Library) {
// bp2build converts this module to 2 java_libraries + java_xx_proto_library + proto_library
// the non-empty deps here are not necessary for compiling the protos, in which case
// they're unnecessary as deps on the java_library as well since they aren't
- // being propagated to any dependencies.
- // so we can put the deps to exports and drop deps here.
- exports.Append(deps)
+ // being propagated to any dependencies. So we can drop deps here.
deps = bazel.LabelListAttribute{}
} else {
ctx.ModuleErrorf("Module has direct dependencies but no sources. Bazel will not allow this.")