diff --git a/java/core/BUILD b/java/core/BUILD index c65f10a4e1a5..530d516886cd 100644 --- a/java/core/BUILD +++ b/java/core/BUILD @@ -176,6 +176,21 @@ proto_lang_toolchain( command_line = "--java_out=$(OUT)", runtime = ":core", visibility = ["//visibility:public"], + # keep this in sync w/ WELL_KNOWN_PROTO_MAP in //:BUILD + blacklisted_protos = [ + "//:any_proto", + "//:api_proto", + "//:compiler_plugin_proto", + "//:descriptor_proto", + "//:duration_proto", + "//:empty_proto", + "//:field_mask_proto", + "//:source_context_proto", + "//:struct_proto", + "//:timestamp_proto", + "//:type_proto", + "//:wrappers_proto", + ], ) proto_library( diff --git a/java/lite/BUILD b/java/lite/BUILD index 7089f958b0b6..520d22d59148 100644 --- a/java/lite/BUILD +++ b/java/lite/BUILD @@ -17,6 +17,19 @@ proto_lang_toolchain( command_line = "--java_out=lite:$(OUT)", runtime = ":lite", visibility = ["//visibility:public"], + # keep this in sync w/ LITE_WELL_KNOWN_PROTO_MAP in //:BUILD + blacklisted_protos = [ + "//:any_proto", + "//:api_proto", + "//:duration_proto", + "//:empty_proto", + "//:field_mask_proto", + "//:source_context_proto", + "//:struct_proto", + "//:timestamp_proto", + "//:type_proto", + "//:wrappers_proto", + ], ) test_suite(