Skip to content

Commit

Permalink
Remove unnecessary run_tests script and other miscellaneous changes.
Browse files Browse the repository at this point in the history
- Setting `USE_BAZEL_VERSION` the environment is redundant with the `.bazelversion` file.
- Boolean attributes should use `True` instead of `1`.
- Some BUILD files contain copypasted comments that were incorrect.

PiperOrigin-RevId: 682478434
  • Loading branch information
chaoren authored and Google Java Core Libraries committed Oct 7, 2024
1 parent e2204d6 commit 6cd1922
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 47 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
test:
name: "Test"
runs-on: ubuntu-latest
env:
# Used by bazelisk: https://github.com/bazelbuild/bazelisk
USE_BAZEL_VERSION: '7.3.1'
steps:
- name: 'Check out repository'
uses: actions/checkout@v2
Expand All @@ -27,4 +24,4 @@ jobs:
bazel-
- name: 'Test'
shell: bash
run: ./run_tests.sh
run: bazelisk test --lockfile_mode=error --test_output=errors //...
27 changes: 0 additions & 27 deletions run_tests.sh

This file was deleted.

2 changes: 1 addition & 1 deletion third_party/java/auto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ java_library(

java_plugin(
name = "auto_factory_processor",
generates_api = 1,
generates_api = True,
processor_class = "com.google.auto.factory.processor.AutoFactoryProcessor",
visibility = ["//visibility:private"],
deps = [
Expand Down
4 changes: 2 additions & 2 deletions third_party/java/byte_buddy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# BUILD rules for https://github.com/mockito/mockito
# BUILD rules for https://bytebuddy.net/

load("@rules_java//java:defs.bzl", "java_library")

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

java_library(
name = "byte_buddy",
testonly = 1,
testonly = True,
exports = ["@maven//:net_bytebuddy_byte_buddy"],
)
4 changes: 2 additions & 2 deletions third_party/java/byte_buddy_agent/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# BUILD rules for https://github.com/mockito/mockito
# BUILD rules for https://bytebuddy.net/

load("@rules_java//java:defs.bzl", "java_library")

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

java_library(
name = "byte_buddy_agent",
testonly = 1,
testonly = True,
exports = ["@maven//:net_bytebuddy_byte_buddy_agent"],
)
2 changes: 1 addition & 1 deletion third_party/java/compile_testing/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package(default_visibility = ["//visibility:public"])

java_library(
name = "compile_testing",
testonly = 1,
testonly = True,
add_exports = [
"jdk.compiler/com.sun.tools.javac.api",
"jdk.compiler/com.sun.tools.javac.main",
Expand Down
2 changes: 1 addition & 1 deletion third_party/java/diffutils/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# BUILD rules for https://github.com/google/truth
# BUILD rules for https://code.google.com/archive/p/java-diff-utils/

load("@rules_java//java:defs.bzl", "java_library")

Expand Down
2 changes: 1 addition & 1 deletion third_party/java/guava/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ java_library(

java_library(
name = "testlib",
testonly = 1,
testonly = True,
exports = ["@maven//:com_google_guava_guava_testlib"],
runtime_deps = [":guava"],
)
Expand Down
2 changes: 1 addition & 1 deletion third_party/java/hamcrest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ package(default_visibility = ["//visibility:public"])

java_library(
name = "hamcrest",
testonly = 1,
testonly = True,
exports = ["@maven//:org_hamcrest_hamcrest_core"],
)
2 changes: 1 addition & 1 deletion third_party/java/junit/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package(default_visibility = ["//visibility:public"])

java_library(
name = "junit",
testonly = 1,
testonly = True,
exports = ["@maven//:junit_junit"],
runtime_deps = ["//third_party/java/hamcrest"],
)
2 changes: 1 addition & 1 deletion third_party/java/log4j/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# BUILD rules for https://logging.apache.org/log4j/1.2
# BUILD rules for https://logging.apache.org/log4j/1.x/

load("@rules_java//java:defs.bzl", "java_library")

Expand Down
2 changes: 1 addition & 1 deletion third_party/java/mockito/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package(default_visibility = ["//visibility:public"])

java_library(
name = "mockito",
testonly = 1,
testonly = True,
exports = ["@maven//:org_mockito_mockito_core"],
runtime_deps = [
"//third_party/java/byte_buddy",
Expand Down
4 changes: 2 additions & 2 deletions third_party/java/objenesis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# BUILD rules for https://github.com/mockito/mockito
# BUILD rules for https://objenesis.org/

load("@rules_java//java:defs.bzl", "java_library")

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

java_library(
name = "objenesis",
testonly = 1,
testonly = True,
exports = ["@maven//:org_objenesis_objenesis"],
)
2 changes: 1 addition & 1 deletion third_party/java/slf4j_api/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# BUILD rules for org.slf4j:slf4j-api
# BUILD rules for https://www.slf4j.org/

load("@rules_java//java:defs.bzl", "java_library")

Expand Down
2 changes: 1 addition & 1 deletion third_party/java/truth/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package(default_visibility = ["//visibility:public"])

java_library(
name = "truth",
testonly = 1,
testonly = True,
exports = [
"@maven//:com_google_truth_extensions_truth_java8_extension",
"@maven//:com_google_truth_truth",
Expand Down

0 comments on commit 6cd1922

Please sign in to comment.