Internal change

PiperOrigin-RevId: 651391344
Change-Id: I73b926abba494cfca6ea427f45131454a7d1027f
diff --git a/java/BUILD b/java/BUILD
index 8b7465e..7629e97 100644
--- a/java/BUILD
+++ b/java/BUILD
@@ -38,6 +38,7 @@
     ],
     visibility = ["//visibility:public"],
     deps = [
+        "//java/bazel/rules",
         "//java/common",
         "//java/private",
     ],
@@ -64,6 +65,7 @@
         ":core_rules",
         ":java_single_jar",
         ":rules",
+        "//java/bazel/rules:for_bazel_tests",
         "//java/common:for_bazel_tests",
         "//java/private:for_bazel_tests",
     ],
diff --git a/java/bazel/rules/BUILD.bazel b/java/bazel/rules/BUILD.bazel
new file mode 100644
index 0000000..e7067f9
--- /dev/null
+++ b/java/bazel/rules/BUILD.bazel
@@ -0,0 +1,30 @@
+# Copyright 2024 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+
+bzl_library(
+    name = "rules",
+    srcs = glob(["*.bzl"]),
+    visibility = ["//java:__pkg__"],
+)
+
+filegroup(
+    name = "for_bazel_tests",
+    testonly = 1,
+    srcs = [
+        "BUILD.bazel",
+        ":rules",
+    ],
+    visibility = ["//java:__pkg__"],
+)
diff --git a/java/bazel/rules/empty.bzl b/java/bazel/rules/empty.bzl
new file mode 100644
index 0000000..6981db7
--- /dev/null
+++ b/java/bazel/rules/empty.bzl
@@ -0,0 +1,14 @@
+# Copyright 2024 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Empty file as a placeholder for migration"""
diff --git a/java/java_binary.bzl b/java/java_binary.bzl
index b35064c..7184ecb 100644
--- a/java/java_binary.bzl
+++ b/java/java_binary.bzl
@@ -1,4 +1,4 @@
-# Copyright 2023 The Bazel Authors. All rights reserved.
+# Copyright 2024 The Bazel Authors. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,8 +13,6 @@
 # limitations under the License.
 """java_binary rule"""
 
-# Do not touch: This line marks the end of loads; needed for PR importing.
-
 def java_binary(**attrs):
     """Bazel java_binary rule.
 
diff --git a/java/java_import.bzl b/java/java_import.bzl
index 24a52af..926c37a 100644
--- a/java/java_import.bzl
+++ b/java/java_import.bzl
@@ -1,4 +1,4 @@
-# Copyright 2023 The Bazel Authors. All rights reserved.
+# Copyright 2024 The Bazel Authors. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
diff --git a/java/java_library.bzl b/java/java_library.bzl
index 2dff6d6..9308bbc 100644
--- a/java/java_library.bzl
+++ b/java/java_library.bzl
@@ -1,4 +1,4 @@
-# Copyright 2023 The Bazel Authors. All rights reserved.
+# Copyright 2024 The Bazel Authors. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,8 +13,6 @@
 # limitations under the License.
 """java_library rule"""
 
-# Do not touch: This line marks the end of loads; needed for PR importing.
-
 def java_library(**attrs):
     """Bazel java_library rule.
 
diff --git a/java/java_plugin.bzl b/java/java_plugin.bzl
index e26ae04..d12e0e1 100644
--- a/java/java_plugin.bzl
+++ b/java/java_plugin.bzl
@@ -1,4 +1,4 @@
-# Copyright 2023 The Bazel Authors. All rights reserved.
+# Copyright 2024 The Bazel Authors. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
diff --git a/java/java_test.bzl b/java/java_test.bzl
index 7064b5b..0aeac91 100644
--- a/java/java_test.bzl
+++ b/java/java_test.bzl
@@ -1,4 +1,4 @@
-# Copyright 2023 The Bazel Authors. All rights reserved.
+# Copyright 2024 The Bazel Authors. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,8 +13,6 @@
 # limitations under the License.
 """java_test rule"""
 
-# Do not touch: This line marks the end of loads; needed for PR importing.
-
 def java_test(**attrs):
     """Bazel java_test rule.