diff --git a/java/internal/testing.bzl b/java/internal/testing.bzl index ee8f80f262..3939ccadcf 100644 --- a/java/internal/testing.bzl +++ b/java/internal/testing.bzl @@ -2,6 +2,9 @@ Generates a side-car JUnit suite test runner class for each input src. """ + +load("@rules_java//java:defs.bzl", "java_library", "java_test") + _template = """import org.junit.runners.Suite; import org.junit.runner.RunWith; @@ -36,7 +39,7 @@ _gen_suite = rule( def junit_tests(name, srcs, data = [], deps = [], package_name = "com.google.protobuf", test_prefix = None, **kwargs): testlib_name = "%s_lib" % name - native.java_library( + java_library( name = testlib_name, srcs = srcs, deps = deps, @@ -59,7 +62,7 @@ def junit_tests(name, srcs, data = [], deps = [], package_name = "com.google.pro package_name = package_name, outname = suite_name, ) - native.java_test( + java_test( name = test_name, test_class = suite_name, srcs = [src] + [":" + suite_name],