Skip to content

Commit

Permalink
Add missing bzl_library and test filegroups
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 673788851
Change-Id: Ibe81809a76f0f038f022d50aa42ec359aa734594
  • Loading branch information
hvadehra authored and rules_java Copybara committed Sep 12, 2024
1 parent 2f6c7e1 commit e40342e
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 0 deletions.
6 changes: 6 additions & 0 deletions java/bazel/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,9 @@ done <<< '{configs}' >> $@
],
visibility = ["//visibility:private"],
)

filegroup(
name = "for_bazel_tests",
testonly = 1,
visibility = ["//java:__pkg__"],
)
6 changes: 6 additions & 0 deletions java/bazel/common/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

bzl_library(
name = "common",
srcs = glob(["*.bzl"]),
)
1 change: 1 addition & 0 deletions java/bazel/common/empty.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Placeholder for glob"""
1 change: 1 addition & 0 deletions java/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ filegroup(
srcs = [
"BUILD",
":common",
"//java/common/rules:for_bazel_tests",
],
visibility = ["//java:__pkg__"],
)
48 changes: 48 additions & 0 deletions java/common/rules/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

package(default_visibility = ["//visibility:public"])

filegroup(
Expand All @@ -7,3 +9,49 @@ filegroup(
],
visibility = ["//java/common:__pkg__"],
)

bzl_library(
name = "android_lint_bzl",
srcs = ["android_lint.bzl"],
visibility = ["//visibility:private"],
)

bzl_library(
name = "rule_util_bzl",
srcs = ["rule_util.bzl"],
visibility = ["//visibility:private"],
)

bzl_library(
name = "core_rules",
srcs = [
"basic_java_library.bzl",
"java_binary.bzl",
"java_binary_wrapper.bzl",
"java_import.bzl",
"java_library.bzl",
"java_plugin.bzl",
"java_toolchain.bzl",
],
visibility = [
"//java:__pkg__",
],
deps = [
":android_lint_bzl",
":rule_util_bzl",
# TODO: re-enable after rules_cc release
# "@rules_cc//cc/common",
"//java/common",
"@bazel_skylib//lib:paths",
],
)

filegroup(
name = "for_bazel_tests",
testonly = 1,
srcs = [
"BUILD",
":core_rules",
],
visibility = ["//java/common:__pkg__"],
)

0 comments on commit e40342e

Please sign in to comment.