Skip to content

Commit

Permalink
Remove top-level usage of native java_common in java_toolchain.bzl
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 698281701
Change-Id: I8cba5638421b0a0d2ff7c95fce132b8135a90aab
  • Loading branch information
hvadehra authored and rules_java Copybara committed Nov 20, 2024
1 parent 8bc4290 commit 97a3dfb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions java/common/rules/java_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ load("//java/common:java_semantics.bzl", "semantics")
load("//java/common/rules/impl:java_helper.bzl", "helper")
load("//java/private:boot_class_path_info.bzl", "BootClassPathInfo")
load("//java/private:java_info.bzl", "JavaPluginDataInfo")
load("//java/private:native.bzl", "get_internal_java_common")
load(":java_package_configuration.bzl", "JavaPackageConfigurationInfo")
load(":java_runtime.bzl", "JavaRuntimeInfo")

# copybara: default visibility

_java_common_internal = java_common.internal_DO_NOT_USE()
ToolchainInfo = platform_common.ToolchainInfo

def _java_toolchain_info_init(**_kwargs):
Expand Down Expand Up @@ -99,7 +99,7 @@ def _java_toolchain_impl(ctx):
ijar = ctx.attr.ijar.files_to_run if ctx.attr.ijar else None,
jacocorunner = ctx.attr.jacocorunner.files_to_run if ctx.attr.jacocorunner else None,
java_runtime = java_runtime,
jvm_opt = depset(_java_common_internal.expand_java_opts(ctx, "jvm_opts", tokenize = False, exec_paths = True)),
jvm_opt = depset(get_internal_java_common().expand_java_opts(ctx, "jvm_opts", tokenize = False, exec_paths = True)),
label = ctx.label,
proguard_allowlister = ctx.attr.proguard_allowlister.files_to_run if ctx.attr.proguard_allowlister else None,
single_jar = ctx.attr.singlejar.files_to_run,
Expand Down Expand Up @@ -164,8 +164,8 @@ def _get_javac_opts(ctx):
opts.extend(["-target", ctx.attr.target_version])
if ctx.attr.xlint:
opts.append("-Xlint:" + ",".join(ctx.attr.xlint))
opts.extend(_java_common_internal.expand_java_opts(ctx, "misc", tokenize = True))
opts.extend(_java_common_internal.expand_java_opts(ctx, "javacopts", tokenize = True))
opts.extend(get_internal_java_common().expand_java_opts(ctx, "misc", tokenize = True))
opts.extend(get_internal_java_common().expand_java_opts(ctx, "javacopts", tokenize = True))
return opts

def _get_android_lint_tool(ctx):
Expand Down

0 comments on commit 97a3dfb

Please sign in to comment.