Skip to content

Commit

Permalink
Merge pull request #18616 from deannagarcia/28.x
Browse files Browse the repository at this point in the history
Remove javaopts requiring java8 in non-release builds.
  • Loading branch information
deannagarcia authored Oct 4, 2024
2 parents 63076f5 + 664a7e1 commit fe3bb07
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions build_defs/java_opts.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ load("@rules_jvm_external//:defs.bzl", "java_export")
load("//:protobuf_version.bzl", "PROTOBUF_JAVA_VERSION")
load("//java/osgi:osgi.bzl", "osgi_java_library")

JAVA_OPTS = [
JAVA_RELEASE_OPTS = [
"-source 8",
"-target 8",
"-Xep:Java8ApiChecker:ERROR",
Expand All @@ -16,13 +16,12 @@ BUNDLE_LICENSE = "https://opensource.org/licenses/BSD-3-Clause"

def protobuf_java_export(**kwargs):
java_export(
javacopts = JAVA_OPTS,
javacopts = JAVA_RELEASE_OPTS,
**kwargs
)

def protobuf_java_library(**kwargs):
java_library(
javacopts = JAVA_OPTS,
**kwargs
)

Expand Down Expand Up @@ -68,7 +67,7 @@ def protobuf_versioned_java_library(
java_library target.
"""
osgi_java_library(
javacopts = JAVA_OPTS,
javacopts = JAVA_RELEASE_OPTS,
automatic_module_name = automatic_module_name,
bundle_doc_url = BUNDLE_DOC_URL,
bundle_license = BUNDLE_LICENSE,
Expand Down

0 comments on commit fe3bb07

Please sign in to comment.