build file updates to support bazel 0.21
Change-Id: I79d3900fc8c14dbecff249cec139754115186352
diff --git a/.bazelrc b/.bazelrc
index 6c46951..ac1cb12 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1,5 +1,6 @@
build --nouse_ijars
build --experimental_strict_action_env
+build --incompatible_package_name_is_a_function=false
test --test_summary=terse
test --test_output=errors
test --test_verbose_timeout_warnings
diff --git a/tools/build/bazel/generate_test_rules.bzl b/tools/build/bazel/generate_test_rules.bzl
index 03f5073..17f811e 100644
--- a/tools/build/bazel/generate_test_rules.bzl
+++ b/tools/build/bazel/generate_test_rules.bzl
@@ -61,7 +61,7 @@
if (test in flaky_tests) or ("flaky" in tags):
flaky = 1
java_class = _package_from_path(
- PACKAGE_NAME + "/" + _strip_right(test, ".java"),
+ native.package_name() + "/" + _strip_right(test, ".java"),
)
package = java_class[:java_class.rfind(".")]
native.java_test(