Skip to content

Commit 75db69a

Browse files
authored
Add missing java and shell load statements (#1318)
* Add missing java and shell load statements * Remove the install.tools make command now that the build target exists * And update .bazelci/presubmit.yml to use the latest * Add missing rules_shell
1 parent d2d26a5 commit 75db69a

File tree

20 files changed

+48
-4
lines changed

20 files changed

+48
-4
lines changed

.bazelci/presubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ matrix:
1313
validate_config: 1
1414
bazel: 7.3.0
1515
buildifier:
16-
version: 7.1.1
16+
version: 8.2.0
1717
# no lint warnings for the moment. They are basically a smoke alarm in hell.
1818
# keep this argument in sync with .pre-commit-config.yaml
1919
warnings: "-confusing-name,-constant-glob,-duplicated-name,-function-docstring,-function-docstring-args,-function-docstring-header,-module-docstring,-name-conventions,-no-effect,-constant-glob,-provider-params,-print,-rule-impl-return,-bzl-visibility,-unnamed-macro,-uninitialized,-unreachable"

BUILD

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
12
load("//kotlin:lint.bzl", "ktlint_config")
23

34
# Copyright 2018 The Bazel Authors. All rights reserved.
@@ -81,3 +82,20 @@ filegroup(
8182
],
8283
visibility = ["//:__subpackages__"],
8384
)
85+
86+
buildifier(
87+
name = "buildifier.check",
88+
exclude_patterns = [
89+
"./.git/*",
90+
],
91+
lint_mode = "warn",
92+
mode = "diff",
93+
)
94+
95+
buildifier(
96+
name = "buildifier.fix",
97+
exclude_patterns = [
98+
"./.git/*",
99+
],
100+
lint_mode = "fix",
101+
)

MODULE.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ bazel_dep(name = "rules_java", version = "8.9.0")
1515
bazel_dep(name = "rules_python", version = "0.23.1")
1616
bazel_dep(name = "rules_android", version = "0.6.4")
1717
bazel_dep(name = "bazel_features", version = "1.25.0")
18+
bazel_dep(name = "rules_shell", version = "0.4.1")
19+
20+
bazel_dep(name = "buildifier_prebuilt", version = "8.0.3", dev_dependency = True)
1821

1922
rules_java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains")
2023
use_repo(rules_java_toolchains, "remote_java_tools")

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,3 @@ docs.regen:
3535

3636
proto.regen:
3737
scripts/gen_proto_jars
38-
39-
install.tools:
40-
go get github.com/bazelbuild/buildtools/buildifier

docs/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_shell//shell:sh_test.bzl", "sh_test")
2+
13
sh_test(
24
name = "are_docs_up_to_date_test",
35
srcs = ["are_docs_up_to_date_test.sh"],

examples/dagger/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_java//java:java_binary.bzl", "java_binary")
2+
13
# Copyright 2018 The Bazel Authors. All rights reserved.
24
#
35
# Licensed under the Apache License, Version 2.0 (the "License");

examples/dagger/third_party/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
load("@rules_java//java:java_library.bzl", "java_library")
2+
load("@rules_java//java:java_plugin.bzl", "java_plugin")
3+
14
java_plugin(
25
name = "dagger_component_plugin",
36
generates_api = True,

examples/deps/libJava1/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_java//java:java_library.bzl", "java_library")
2+
13
java_library(
24
name = "src_main",
35
srcs = glob(["src/main/java/**/*.java"]),

examples/deps/libJava2/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_java//java:java_library.bzl", "java_library")
2+
13
java_library(
24
name = "src_main",
35
srcs = glob(["src/main/java/**/*.java"]),

examples/deps/libJava3/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_java//java:java_library.bzl", "java_library")
2+
13
java_library(
24
name = "src_main",
35
srcs = glob(["src/main/java/**/*.java"]),

0 commit comments

Comments
 (0)