diff options
author | cpovirk <cpovirk@google.com> | 2020-02-27 08:53:21 -0800 |
---|---|---|
committer | Chris Povirk <beigetangerine@gmail.com> | 2020-02-27 13:02:13 -0500 |
commit | 072ece89562ad5a7e413aabc56cabb4c2384a9c7 (patch) | |
tree | 9a99d0bb892d01d686bf91e7818ca07bffc64806 /test_defs.bzl | |
parent | 355ec532e0f36bd67695fe4697b581a0020743c4 (diff) | |
download | dagger2-072ece89562ad5a7e413aabc56cabb4c2384a9c7.tar.gz |
Prepare for external Bazel change --incompatible_load_java_rules_from_bzl.
...by load()-ing java_library and other rules wherever we use them.
Compare to CL 297412705 for Flogger.
This CL includes updating to a new version of bazel_common to avoid --incompatible_load_java_rules_from_bzl errors in bazel_common. See https://github.com/google/bazel-common/pull/104.
Note that this CL also changes the way we get zlib() (a dependency of protobuf) from bind() to http_archive().
http_archive() seems to be the more recommended pattern:
- https://docs.bazel.build/versions/master/external.html#repository-rules
- https://github.com/bazelbuild/bazel/issues/1952
But my immediate motivation was that bind() wasn't working with the new version of protobuf. (The new version of protobuf is necessary to avoid --incompatible_load_java_rules_from_bzl errors inside protobuf. It comes with the new version of bazel_common.)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=297608393
Diffstat (limited to 'test_defs.bzl')
-rw-r--r-- | test_defs.bzl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test_defs.bzl b/test_defs.bzl index f4aca57b7..d3f028fb3 100644 --- a/test_defs.bzl +++ b/test_defs.bzl @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +load("@rules_java//java:defs.bzl", "java_library", "java_test") + # Defines a set of build variants and the list of extra javacopts to build with. # The key will be appended to the generated test names to ensure uniqueness. @@ -32,8 +34,8 @@ def GenJavaTests( test_javacopts = None, functional = True): _GenTests( - native.java_library, - native.java_test, + java_library, + java_test, name, srcs, deps, |