Skip to content

Commit

Permalink
chore: add load()s for the Bazel builtin java rules
Browse files Browse the repository at this point in the history
`load()` statements are being added to prepare for moving the rules out of Bazel and into `rules_java`
  • Loading branch information
hvadehra committed Apr 22, 2024
1 parent 5dadd4c commit 39d58d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gax-java/gax_java.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

load("@rules_java//java:defs.bzl", "java_test")

def java_tests(name, srcs, runtime_deps, size):
classNames = []
for src in srcs:
# convert .java file path to fully qualified class name
className = src[(src.index("/com/") + 1):-5].replace("/", ".")
classNames.append(className)
native.java_test(
java_test(
name = className,
test_class = className,
runtime_deps = runtime_deps,
Expand Down

0 comments on commit 39d58d8

Please sign in to comment.