Skip to content

Commit

Permalink
Load java rules from rules_java.
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Peterson <benjamin@engflow.com>
  • Loading branch information
benjaminp committed Dec 5, 2024
1 parent e405d89 commit 0d673b0
Show file tree
Hide file tree
Showing 33 changed files with 64 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2.1
7.4.1
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module(
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_java", version = "8.6.1")
bazel_dep(name = "rules_jvm_external", version = "6.2")
bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "protobuf", version = "27.2")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

TYPES = [
"BazelProfileConstants.java",
"BazelProfilePhase.java",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "core",
srcs = glob(["*.java"]),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

TYPES = [
"ActionStats.java",
"BazelPhaseDescription.java",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

TYPES = [
"CriticalPathQueuingDuration.java",
"QueuingObserved.java",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "suggestionproviders",
srcs = glob(["*.java"]),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

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

java_library(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "traceeventformat",
srcs = glob(["*.java"]),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "test_base",
testonly = True,
Expand All @@ -14,7 +16,7 @@ java_library(
"//third_party/jsr305",
"//third_party/junit",
"//third_party/mockito",
"@bazel_tools//tools/java/runfiles",
"@rules_java//java/runfiles",
],
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_test")

java_test(
name = "bazelprofile",
srcs = glob(["**/*.java"]),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library", "java_test")

TYPES = [
"TestDatum.java",
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library", "java_test")

java_test(
name = "dataproviders",
srcs = glob(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_test")

java_test(
name = "remoteexecution",
srcs = glob(["**/*.java"]),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_test")

java_test(
name = "integrationtests",
srcs = glob(["**/*.java"]),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_test")

java_test(
name = "suggestionproviders",
srcs = glob(["**/*.java"]),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_test")

java_test(
name = "time",
srcs = glob(["**/*.java"]),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_test")

java_test(
name = "traceeventformat",
srcs = glob(["**/*.java"]),
Expand Down
2 changes: 2 additions & 0 deletions cli/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_binary")

java_binary(
name = "cli",
main_class = "com.engflow.bazel.invocation.analyzer.Main",
Expand Down
2 changes: 2 additions & 0 deletions cli/java/com/engflow/bazel/invocation/analyzer/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "analyzer",
srcs = glob(["*.java"]),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "consoleoutput",
srcs = glob(
Expand Down
2 changes: 2 additions & 0 deletions cli/java/com/engflow/bazel/invocation/analyzer/options/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "options",
srcs = glob(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_test")

java_test(
name = "consoleoutput",
srcs = glob(["*.java"]),
Expand Down
1 change: 1 addition & 0 deletions proto/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_java//java:defs.bzl", "java_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

proto_library(
Expand Down
4 changes: 2 additions & 2 deletions third_party/buildifier/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package(default_visibility = ["//infra:__subpackages__"])

load("@buildifier_prebuilt//:rules.bzl", "buildifier_binary")

package(default_visibility = ["//infra:__subpackages__"])

buildifier_binary(
name = "buildifier",
visibility = ["//visibility:public"],
Expand Down
2 changes: 2 additions & 0 deletions third_party/commons-cli/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "commons_cli",
visibility = ["//visibility:public"],
Expand Down
2 changes: 2 additions & 0 deletions third_party/google-java-format/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_binary")

package(default_visibility = ["//infra:__subpackages__"])

java_binary(
Expand Down
2 changes: 2 additions & 0 deletions third_party/gson/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "gson",
visibility = ["//visibility:public"],
Expand Down
2 changes: 2 additions & 0 deletions third_party/guava/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "guava",
visibility = ["//visibility:public"],
Expand Down
2 changes: 2 additions & 0 deletions third_party/jsr305/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "jsr305",
visibility = ["//visibility:public"],
Expand Down
2 changes: 2 additions & 0 deletions third_party/junit/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "junit",
testonly = 1,
Expand Down
2 changes: 2 additions & 0 deletions third_party/mockito/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "mockito",
testonly = 1,
Expand Down
2 changes: 2 additions & 0 deletions third_party/truth/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")

java_library(
name = "truth",
testonly = 1,
Expand Down

0 comments on commit 0d673b0

Please sign in to comment.