diff --git a/jsinterop_generator.bzl b/jsinterop_generator.bzl index 4895711..64ce6c6 100644 --- a/jsinterop_generator.bzl +++ b/jsinterop_generator.bzl @@ -31,6 +31,7 @@ Examples: """ load("@bazel_common_javadoc//:javadoc.bzl", "javadoc_library") +load("@rules_java//java:defs.bzl", "java_library") load("@com_google_j2cl//build_defs:rules.bzl", "j2cl_library") load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library") @@ -390,8 +391,7 @@ def jsinterop_generator( else: java_library_args["gwtxml"] = gwt_xml_file java_library_args["constraints"] = ["gwt", "public"] - - native.java_library(**java_library_args) + java_library(**java_library_args) _extract_srcjar( name = name + "_generated_files", diff --git a/jsinterop_generator_import.bzl b/jsinterop_generator_import.bzl index c30e331..a3e3f85 100644 --- a/jsinterop_generator_import.bzl +++ b/jsinterop_generator_import.bzl @@ -5,6 +5,7 @@ jsinterop_generator_import() target to be directly depended upon from jsinterop_ targets. """ +load("@rules_java//java:defs.bzl", "java_library") load("@com_google_j2cl//build_defs:rules.bzl", "j2cl_library") load(":jsinterop_generator.bzl", "JS_INTEROP_RULE_NAME_PATTERN", "JsInteropGeneratorInfo") @@ -62,8 +63,7 @@ def jsinterop_generator_import( else: java_library_args["gwtxml"] = gwt_xml java_library_args["constraints"] = ["gwt", "public"] - - native.java_library(**java_library_args) + java_library(**java_library_args) j2cl_library( name = "%s-j2cl" % name,