From f038cde8df5623a11c0a198378650684e7388080 Mon Sep 17 00:00:00 2001 From: Zi Wang Date: Wed, 13 Sep 2023 10:06:54 -0700 Subject: 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 --- java/java.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'java/java.go') 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.") -- cgit v1.2.3-59-g8ed1b