Skip to content

Commit

Permalink
fixup! run fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Gammon <sam@elide.ventures>
  • Loading branch information
sgammon committed Apr 3, 2024
1 parent 1f52b5a commit 832d84d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
23 changes: 12 additions & 11 deletions build_defs/java_opts.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Java options and protobuf-specific java build rules with those options."""

load("@rules_java//java:defs.bzl", "java_library", "java_import")
load("@rules_java//java:defs.bzl", "java_import", "java_library")
load("@rules_jvm_external//:defs.bzl", "java_export")
load("//:protobuf_version.bzl", "PROTOBUF_JAVA_VERSION")
load("//java/osgi:osgi.bzl", "osgi_java_library")
Expand All @@ -26,7 +26,7 @@ JAVA9_OPTS = [

## Default JAR manifest entries to stamp on export.
DEFAULT_MANIFEST_ENTRIES = {
"Multi-Release": "true"
"Multi-Release": "true",
}

## Default visibility settings for Java module targets.
Expand All @@ -48,13 +48,13 @@ def protobuf_java_library(**kwargs):
)

def protobuf_java_module(
name,
module,
module_deps = [],
deps = [],
jvm_version = JPMS_JDK_TARGET,
visibility = DEFAULT_JMOD_VISIBILITY,
**kwargs):
name,
module,
module_deps = [],
deps = [],
jvm_version = JPMS_JDK_TARGET,
visibility = DEFAULT_JMOD_VISIBILITY,
**kwargs):
"""Builds a `module-info.java` definition for use with a Protobuf Java target.
This macro replaces a chain of `java_library` and `genrule` steps to coax Bazel
Expand Down Expand Up @@ -121,7 +121,8 @@ def protobuf_java_module(
deps_rewritten = []
if len(module_deps) > 0:
deps_rewritten = [
"%s-compilejar" % i for i in module_deps
"%s-compilejar" % i
for i in module_deps
]

java_library(
Expand All @@ -130,7 +131,7 @@ def protobuf_java_module(
javacopts = JAVA9_OPTS,
deps = deps_rewritten + (deps or []),
visibility = visibility,
**kwargs,
**kwargs
)
native.genrule(
name = module_class_target_name,
Expand Down
12 changes: 6 additions & 6 deletions java/core/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ protobuf_java_module(
# Should be used as `//java/lite`.
java_library(
name = "lite",
resources = [":javamodule"],
resource_strip_prefix = "java/core/",
srcs = LITE_SRCS + [
":gen_well_known_protos_javalite",
],
resource_strip_prefix = "java/core/",
resources = [":javamodule"],
visibility = [
"//java/lite:__pkg__",
],
Expand All @@ -150,8 +150,8 @@ protobuf_versioned_java_library(
"guarantee API/ABI stability.",
bundle_name = "Protocol Buffers [Lite]",
bundle_symbolic_name = "com.google.protobuf",
resources = [":javamodule"],
resource_strip_prefix = "java/core/",
resources = [":javamodule"],
visibility = [
"//java/lite:__pkg__",
],
Expand Down Expand Up @@ -224,9 +224,9 @@ java_library(
) + [
":gen_well_known_protos_java",
],
visibility = ["//visibility:public"],
resources = [":javamodule"],
resource_strip_prefix = "java/core/",
resources = [":javamodule"],
visibility = ["//visibility:public"],
exports = [
":lite_runtime_only",
],
Expand All @@ -250,8 +250,8 @@ protobuf_versioned_java_library(
"efficient yet extensible format.",
bundle_name = "Protocol Buffers [Core]",
bundle_symbolic_name = "com.google.protobuf",
resources = [":javamodule"],
resource_strip_prefix = "java/core/",
resources = [":javamodule"],
visibility = ["//visibility:public"],
exports = [
":lite_runtime_only",
Expand Down
4 changes: 2 additions & 2 deletions java/util/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ java_library(
srcs = glob([
"src/main/java/com/google/protobuf/util/*.java",
]),
resources = [":javamodule"],
resource_strip_prefix = "java/util/",
resources = [":javamodule"],
visibility = ["//visibility:public"],
deps = [
"//java/core",
Expand All @@ -38,8 +38,8 @@ protobuf_versioned_java_library(
bundle_description = "Utilities for Protocol Buffers",
bundle_name = "Protocol Buffers [Util]",
bundle_symbolic_name = "com.google.protobuf.util",
resources = [":javamodule"],
resource_strip_prefix = "java/util/",
resources = [":javamodule"],
visibility = ["//visibility:public"],
deps = [
"//java/core",
Expand Down

0 comments on commit 832d84d

Please sign in to comment.