From dd823a22f4818f7661509ff0aba09dba220da9da Mon Sep 17 00:00:00 2001 From: Ittai Zeidman Date: Sat, 15 Feb 2020 21:36:31 +0200 Subject: [PATCH] load java rules explicitly --- private/BUILD | 2 ++ scala/BUILD | 1 + scala_proto/BUILD | 1 + specs2/BUILD | 2 ++ src/java/io/bazel/rulesscala/coverage/instrumenter/BUILD | 2 ++ src/java/io/bazel/rulesscala/exe/BUILD | 2 ++ src/java/io/bazel/rulesscala/io_utils/BUILD | 2 ++ src/java/io/bazel/rulesscala/jar/BUILD | 2 ++ src/java/io/bazel/rulesscala/scala_test/BUILD | 2 ++ src/java/io/bazel/rulesscala/scalac/BUILD | 1 + src/java/io/bazel/rulesscala/worker/BUILD | 2 ++ test/BUILD | 2 ++ test/coverage/BUILD | 1 + test/example_jars/BUILD | 2 ++ test/jmh/BUILD | 1 + test/proto/BUILD | 1 + test/src/main/scala/scalarules/test/scala_import/BUILD | 1 + .../test/twitter_scrooge/thrift/bare_jar_thrifts/BUILD | 1 + test_expect_failure/missing_direct_deps/internal_deps/BUILD | 2 ++ test_expect_failure/transitive/java_to_scala/BUILD | 1 + test_expect_failure/transitive/scala_to_java/BUILD | 1 + test_version/version_specific_tests_dir/BUILD | 2 ++ test_version/version_specific_tests_dir/proto/BUILD | 1 + .../test/twitter_scrooge/thrift/bare_jar_thrifts/BUILD | 1 + third_party/bazel/src/main/protobuf/BUILD | 1 + 25 files changed, 37 insertions(+) diff --git a/private/BUILD b/private/BUILD index e0235a43d..469006a8d 100644 --- a/private/BUILD +++ b/private/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_binary") + java_binary( name = "java_format", main_class = "com.google.googlejavaformat.java.Main", diff --git a/scala/BUILD b/scala/BUILD index a5c8f2416..d636faacc 100644 --- a/scala/BUILD +++ b/scala/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_import", "java_library") load( "@io_bazel_rules_scala//scala:providers.bzl", _declare_scalac_provider = "declare_scalac_provider", diff --git a/scala_proto/BUILD b/scala_proto/BUILD index 55fe207ad..a7c0bc0c9 100644 --- a/scala_proto/BUILD +++ b/scala_proto/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_library") load("//scala_proto:scala_proto_toolchain.bzl", "scala_proto_toolchain") load("//scala_proto:default_dep_sets.bzl", "DEFAULT_SCALAPB_COMPILE_DEPS", "DEFAULT_SCALAPB_GRPC_DEPS") diff --git a/specs2/BUILD b/specs2/BUILD index d610597db..fda8ee13e 100644 --- a/specs2/BUILD +++ b/specs2/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_import") + package(default_visibility = ["//visibility:public"]) java_import( diff --git a/src/java/io/bazel/rulesscala/coverage/instrumenter/BUILD b/src/java/io/bazel/rulesscala/coverage/instrumenter/BUILD index a9d82ac7f..13aa7a445 100644 --- a/src/java/io/bazel/rulesscala/coverage/instrumenter/BUILD +++ b/src/java/io/bazel/rulesscala/coverage/instrumenter/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_binary") + java_binary( name = "instrumenter", srcs = [ diff --git a/src/java/io/bazel/rulesscala/exe/BUILD b/src/java/io/bazel/rulesscala/exe/BUILD index 0a36ca645..115b61c53 100644 --- a/src/java/io/bazel/rulesscala/exe/BUILD +++ b/src/java/io/bazel/rulesscala/exe/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_binary", "java_library") + java_library( name = "exe-lib", srcs = [ diff --git a/src/java/io/bazel/rulesscala/io_utils/BUILD b/src/java/io/bazel/rulesscala/io_utils/BUILD index 3d72bd8e1..f3d6c1c32 100644 --- a/src/java/io/bazel/rulesscala/io_utils/BUILD +++ b/src/java/io/bazel/rulesscala/io_utils/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + java_library( name = "io_utils", srcs = glob(["*.java"]), diff --git a/src/java/io/bazel/rulesscala/jar/BUILD b/src/java/io/bazel/rulesscala/jar/BUILD index 173484d19..c92d77853 100644 --- a/src/java/io/bazel/rulesscala/jar/BUILD +++ b/src/java/io/bazel/rulesscala/jar/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_binary", "java_library") + java_library( name = "jar", srcs = [ diff --git a/src/java/io/bazel/rulesscala/scala_test/BUILD b/src/java/io/bazel/rulesscala/scala_test/BUILD index 2b4f1d851..ba02286d8 100644 --- a/src/java/io/bazel/rulesscala/scala_test/BUILD +++ b/src/java/io/bazel/rulesscala/scala_test/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + java_library( name = "runner", srcs = ["Runner.java"], diff --git a/src/java/io/bazel/rulesscala/scalac/BUILD b/src/java/io/bazel/rulesscala/scalac/BUILD index ec7f89795..2cf4ded22 100644 --- a/src/java/io/bazel/rulesscala/scalac/BUILD +++ b/src/java/io/bazel/rulesscala/scalac/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_binary") load( ":jvm_export_toolchain.bzl", _export_scalac_repositories_from_toolchain_to_jvm = "export_scalac_repositories_from_toolchain_to_jvm", diff --git a/src/java/io/bazel/rulesscala/worker/BUILD b/src/java/io/bazel/rulesscala/worker/BUILD index ffc41bbcb..61c69e98d 100644 --- a/src/java/io/bazel/rulesscala/worker/BUILD +++ b/src/java/io/bazel/rulesscala/worker/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + java_library( name = "worker", srcs = [ diff --git a/test/BUILD b/test/BUILD index 892fc1841..1330d1990 100644 --- a/test/BUILD +++ b/test/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_binary", "java_import", "java_library") + package(default_testonly = 1) load( diff --git a/test/coverage/BUILD b/test/coverage/BUILD index 1d3cc583b..66bb48a8e 100644 --- a/test/coverage/BUILD +++ b/test/coverage/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_library", "java_test") load("//scala:scala.bzl", "scala_library", "scala_test") load("//scala:scala_toolchain.bzl", "scala_toolchain") diff --git a/test/example_jars/BUILD b/test/example_jars/BUILD index 612e2e857..773f28aa5 100644 --- a/test/example_jars/BUILD +++ b/test/example_jars/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_import") + java_import( name = "example_jar1", jars = [ diff --git a/test/jmh/BUILD b/test/jmh/BUILD index 17edd80d1..143b9367c 100644 --- a/test/jmh/BUILD +++ b/test/jmh/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_library") load("//scala:scala.bzl", "scala_library") load("//jmh:jmh.bzl", "scala_benchmark_jmh") diff --git a/test/proto/BUILD b/test/proto/BUILD index 291295c32..f97e6ddb3 100644 --- a/test/proto/BUILD +++ b/test/proto/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_proto_library") load("@rules_proto//proto:defs.bzl", "proto_library") load( "//scala_proto:scala_proto.bzl", diff --git a/test/src/main/scala/scalarules/test/scala_import/BUILD b/test/src/main/scala/scalarules/test/scala_import/BUILD index 0ffc07d7c..80ca9ccd7 100644 --- a/test/src/main/scala/scalarules/test/scala_import/BUILD +++ b/test/src/main/scala/scalarules/test/scala_import/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_import") load("//scala:scala.bzl", "scala_library", "scala_specs2_junit_test") load("//scala:scala_import.bzl", "scala_import") diff --git a/test/src/main/scala/scalarules/test/twitter_scrooge/thrift/bare_jar_thrifts/BUILD b/test/src/main/scala/scalarules/test/twitter_scrooge/thrift/bare_jar_thrifts/BUILD index 7ba56931a..ac9c03ac4 100644 --- a/test/src/main/scala/scalarules/test/twitter_scrooge/thrift/bare_jar_thrifts/BUILD +++ b/test/src/main/scala/scalarules/test/twitter_scrooge/thrift/bare_jar_thrifts/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_import") load("//thrift:thrift.bzl", "thrift_library") java_import( diff --git a/test_expect_failure/missing_direct_deps/internal_deps/BUILD b/test_expect_failure/missing_direct_deps/internal_deps/BUILD index de6053f4f..ac1ade64a 100644 --- a/test_expect_failure/missing_direct_deps/internal_deps/BUILD +++ b/test_expect_failure/missing_direct_deps/internal_deps/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) load("//scala:scala.bzl", "scala_binary", "scala_library", "scala_test") diff --git a/test_expect_failure/transitive/java_to_scala/BUILD b/test_expect_failure/transitive/java_to_scala/BUILD index 73d288846..c60bd89cb 100644 --- a/test_expect_failure/transitive/java_to_scala/BUILD +++ b/test_expect_failure/transitive/java_to_scala/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_library") load("//scala:scala.bzl", "scala_export_to_java", "scala_library") scala_library( diff --git a/test_expect_failure/transitive/scala_to_java/BUILD b/test_expect_failure/transitive/scala_to_java/BUILD index 9e2ab1c2b..dd06d56e0 100644 --- a/test_expect_failure/transitive/scala_to_java/BUILD +++ b/test_expect_failure/transitive/scala_to_java/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_library") load("//scala:scala.bzl", "scala_library") java_library( diff --git a/test_version/version_specific_tests_dir/BUILD b/test_version/version_specific_tests_dir/BUILD index 5c048a244..b80c9f893 100644 --- a/test_version/version_specific_tests_dir/BUILD +++ b/test_version/version_specific_tests_dir/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_binary", "java_library") + package(default_testonly = 1) load( diff --git a/test_version/version_specific_tests_dir/proto/BUILD b/test_version/version_specific_tests_dir/proto/BUILD index fae744efa..e49bf63f7 100644 --- a/test_version/version_specific_tests_dir/proto/BUILD +++ b/test_version/version_specific_tests_dir/proto/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_proto_library") load( "@io_bazel_rules_scala//scala_proto:scala_proto.bzl", "scala_proto_library", diff --git a/test_version/version_specific_tests_dir/src/main/scala/scalarules/test/twitter_scrooge/thrift/bare_jar_thrifts/BUILD b/test_version/version_specific_tests_dir/src/main/scala/scalarules/test/twitter_scrooge/thrift/bare_jar_thrifts/BUILD index 199526a6a..cef19fe06 100644 --- a/test_version/version_specific_tests_dir/src/main/scala/scalarules/test/twitter_scrooge/thrift/bare_jar_thrifts/BUILD +++ b/test_version/version_specific_tests_dir/src/main/scala/scalarules/test/twitter_scrooge/thrift/bare_jar_thrifts/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_import") load("@io_bazel_rules_scala//thrift:thrift.bzl", "thrift_library") java_import( diff --git a/third_party/bazel/src/main/protobuf/BUILD b/third_party/bazel/src/main/protobuf/BUILD index b4b6c743b..a505b865d 100644 --- a/third_party/bazel/src/main/protobuf/BUILD +++ b/third_party/bazel/src/main/protobuf/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_proto_library") load("@rules_proto//proto:defs.bzl", "proto_library") licenses(["notice"])