Add load() statements for the builtin Bazel java rules

Loads are being added in preparation for moving the rules out of Bazel and into `rules_java`.

PiperOrigin-RevId: 621489058
This commit is contained in:
Brotli 2024-04-03 05:17:51 -07:00 committed by Copybara-Service
parent 9351fa7ffb
commit b6f2d49feb

View File

@ -1,5 +1,7 @@
"""Utilities for Java brotli tests.""" """Utilities for Java brotli tests."""
load("//third_party/bazel_rules/rules_java/java:java_test.bzl", "java_test")
_TEST_JVM_FLAGS = [ _TEST_JVM_FLAGS = [
"-DBROTLI_ENABLE_ASSERTS=true", "-DBROTLI_ENABLE_ASSERTS=true",
] ]
@ -30,8 +32,7 @@ def brotli_java_test(name, main_class = None, jvm_flags = None, test_kotlin = Fa
test_class = test_package + "." + name test_class = test_package + "." + name
else: else:
test_class = None test_class = None
java_test(
native.java_test(
name = name + "_32", name = name + "_32",
main_class = main_class, main_class = main_class,
test_class = test_class, test_class = test_class,
@ -40,8 +41,7 @@ def brotli_java_test(name, main_class = None, jvm_flags = None, test_kotlin = Fa
runtime_deps = runtime_deps, runtime_deps = runtime_deps,
**kwargs **kwargs
) )
java_test(
native.java_test(
name = name + "_64", name = name + "_64",
main_class = main_class, main_class = main_class,
test_class = test_class, test_class = test_class,
@ -52,7 +52,7 @@ def brotli_java_test(name, main_class = None, jvm_flags = None, test_kotlin = Fa
) )
if test_kotlin: if test_kotlin:
native.java_test( java_test(
name = name + "_kt", name = name + "_kt",
main_class = main_class, main_class = main_class,
test_class = test_class, test_class = test_class,