Skip to content

Commit 7a4c63b

Browse files
authored
Fix lite classes in the protobuf-java Maven release to be JDK8 compatible. (#20843)
Adds LITE_SRCS to core_bundle which seems to be sufficient to ensure these are compiled targeting Java 8 in //java/core:core_mvn Bazel 7. Note this changes the output of `//java/core:core_bundle`, which should only be used for `//java/core:core_mvn` anyways. This seems to have been broken originally by commit (c820dd0) when using bazel 7 image. Fixes #20580 PiperOrigin-RevId: 740372071
1 parent 7831669 commit 7a4c63b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

java/core/BUILD.bazel

+4-8
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ java_library(
147147
deps = [":lite_runtime_only"],
148148
)
149149

150+
# Bazel users, don't depend on this target, use //java/lite.
150151
protobuf_versioned_java_library(
151152
name = "lite_bundle",
152153
srcs = LITE_SRCS + [
@@ -268,22 +269,17 @@ java_library(
268269
],
269270
)
270271

272+
# Bazel users, don't depend on this target, use :core.
271273
protobuf_versioned_java_library(
272274
name = "core_bundle",
273-
srcs = FULL_SRCS,
275+
srcs = FULL_SRCS + LITE_SRCS,
274276
automatic_module_name = "com.google.protobuf",
275277
bundle_description = "Core Protocol Buffers library. Protocol Buffers " +
276278
"are a way of encoding structured data in an " +
277279
"efficient yet extensible format.",
278280
bundle_name = "Protocol Buffers [Core]",
279281
bundle_symbolic_name = "com.google.protobuf",
280-
visibility = ["//visibility:public"],
281-
exports = [
282-
":lite_runtime_only",
283-
],
284-
deps = [
285-
":lite_runtime_only",
286-
],
282+
visibility = ["//visibility:private"],
287283
)
288284

289285
# Bazel users, don't depend on this target, use :core.

0 commit comments

Comments
 (0)