Skip to content

Commit

Permalink
Modernize to latest bzlmod
Browse files Browse the repository at this point in the history
  • Loading branch information
l46kok committed Oct 10, 2024
1 parent c7a2e18 commit 0361d02
Show file tree
Hide file tree
Showing 32 changed files with 1,780 additions and 307 deletions.
3 changes: 2 additions & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
6.5.0
7.3.2
# 6.5.0
# Pinned until https://github.com/bazelbuild/rules_jvm_external/issues/1048 is fixed
62 changes: 26 additions & 36 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,18 @@
# limitations under the License.

module(
name = "cel_java"
name = "cel_java",
)

bazel_dep(name = "bazel_skylib", version = "1.4.2")
bazel_dep(name = "rules_jvm_external", version = "5.3")
bazel_dep(name = "protobuf", repo_name="com_google_protobuf", version = "23.1")
bazel_dep(name = "googleapis", repo_name="com_google_googleapis", version = "0.0.0-20240326-1c8d509c5")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_jvm_external", version = "6.4")
bazel_dep(name = "protobuf", version = "29.0-rc1", repo_name = "com_google_protobuf")
bazel_dep(name = "googleapis", version = "0.0.0-20240819-fe8ba054a", repo_name = "com_google_googleapis")
bazel_dep(name = "rules_pkg", version = "0.10.1")
bazel_dep(name = "rules_license", version = "0.0.8")
bazel_dep(name = "rules_java", version = "7.2.0")
bazel_dep(name = "cel-spec", repo_name="cel_spec", version = "0.14.0")

# The following versions need to be pinned until https://github.com/bazelbuild/rules_jvm_external/issues/1048 is fixed

single_version_override(
module_name = "rules_jvm_external",
version = "5.3"
)
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "grpc-java", version = "1.66.0")
bazel_dep(name = "rules_java", version = "7.12.1")

switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules")
switched_rules.use_languages(java = True)
Expand All @@ -42,38 +36,34 @@ maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
# keep sorted
artifacts = [
"com.google.api.grpc:proto-google-common-protos:2.27.0",
"com.google.auto.value:auto-value-annotations:1.10.4",
"com.google.auto.value:auto-value:1.10.4",
"com.google.auto.value:auto-value:1.11.0",
"com.google.auto.value:auto-value-annotations:1.11.0",
"com.google.code.findbugs:annotations:3.0.1",
"com.google.errorprone:error_prone_annotations:2.23.0",
"com.google.guava:guava-testlib:33.0.0-jre",
"com.google.guava:guava:33.0.0-jre",
"com.google.protobuf:protobuf-java-util:3.24.4",
"com.google.protobuf:protobuf-java:3.24.4",
"com.google.errorprone:error_prone_annotations:2.33.0",
"com.google.guava:guava:33.3.1-jre",
"com.google.guava:guava-testlib:33.3.1-jre",
"com.google.protobuf:protobuf-java:4.29.0-RC1",
"com.google.protobuf:protobuf-java-util:4.29.0-RC1",
"com.google.re2j:re2j:1.7",
"com.google.testparameterinjector:test-parameter-injector:1.15",
"com.google.truth.extensions:truth-java8-extension:1.4.0",
"com.google.truth.extensions:truth-proto-extension:1.4.0",
"com.google.truth:truth:1.4.0",
"com.google.testparameterinjector:test-parameter-injector:1.18",
"com.google.truth.extensions:truth-java8-extension:1.4.4",
"com.google.truth.extensions:truth-proto-extension:1.4.4",
"com.google.truth:truth:1.4.4",
"org.antlr:antlr4-runtime:4.11.1",
"org.jspecify:jspecify:0.2.0",
"org.threeten:threeten-extra:1.7.2",
"org.jspecify:jspecify:1.0.0",
"org.threeten:threeten-extra:1.8.0",
"org.yaml:snakeyaml:2.2",
],
fail_if_repin_required = True,
lock_file = "//:maven_install.json",
repositories = [
"https://maven.google.com",
"https://repo1.maven.org/maven2",
],
lock_file = "//:maven_install.json",
fail_if_repin_required=True
)
use_repo(maven, "maven", "unpinned_maven")

non_module_dependencies = use_extension("//:repositories.bzl", "non_module_dependencies")
use_repo(non_module_dependencies, "antlr4_jar")
use_repo(non_module_dependencies, "bazel_common")

# google_common_workspace_rules = use_extension("@bazel_common//:workspace_defs.bzl", "google_common_workspace_rules")
# google_common_workspace_rules()


use_repo(non_module_dependencies, "cel_spec")
2 changes: 1 addition & 1 deletion bundle/src/main/java/dev/cel/bundle/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ java_library(
"//parser:macro",
"//parser:parser_builder",
"//runtime",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@cel_spec//proto/cel/expr:expr_java_proto",
"@maven//:com_google_code_findbugs_annotations",
"@maven//:com_google_errorprone_error_prone_annotations",
Expand Down
2 changes: 1 addition & 1 deletion bundle/src/test/java/dev/cel/bundle/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ java_library(
"//parser:macro",
"//runtime",
"//runtime:unknown_attributes",
"@@protobuf~//java/core",
"@cel_spec//proto/cel/expr:expr_java_proto",
"@cel_spec//proto/test/v1/proto2:test_all_types_java_proto",
"@cel_spec//proto/test/v1/proto3:test_all_types_java_proto",
"@com_google_googleapis//google/rpc/context:attribute_context_java_proto",
"@com_google_googleapis//google/type:type_java_proto",
"@maven//:com_google_guava_guava",
"@maven//:com_google_guava_guava_testlib",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_protobuf_protobuf_java_util",
"@maven//:com_google_testparameterinjector_test_parameter_injector",
"@maven//:com_google_truth_extensions_truth_proto_extension",
Expand Down
10 changes: 5 additions & 5 deletions checker/src/main/java/dev/cel/checker/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ java_library(
"//common/types",
"//common/types:cel_types",
"//common/types:type_providers",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@cel_spec//proto/cel/expr:expr_java_proto",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
Expand Down Expand Up @@ -84,7 +84,7 @@ java_library(
"//common/types:cel_types",
"//common/types:message_type_provider",
"//common/types:type_providers",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@cel_spec//proto/cel/expr:expr_java_proto",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
Expand All @@ -103,7 +103,7 @@ java_library(
"//common:compiler_common",
"//common:options",
"//common/types:type_providers",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@cel_spec//proto/cel/expr:expr_java_proto",
"@maven//:com_google_errorprone_error_prone_annotations",
],
Expand All @@ -116,7 +116,7 @@ java_library(
],
deps = [
"//:auto_value",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
],
Expand Down Expand Up @@ -184,7 +184,7 @@ java_library(
"//common/types:type_providers",
"//parser:macro",
"//parser:operator",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@cel_spec//proto/cel/expr:expr_java_proto",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
Expand Down
2 changes: 1 addition & 1 deletion checker/src/test/java/dev/cel/checker/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ java_library(
srcs = glob(["*Test.java"]),
resources = ["//checker/src/test/resources:baselines"],
deps = [
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
# "//java/com/google/testing/testsize:annotations",
"//:auto_value",
"//checker",
Expand Down
2 changes: 1 addition & 1 deletion codelab/src/main/codelab/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ java_library(
"//validator/validators:homogeneous_literal", # unuseddeps: keep
"//validator/validators:regex", # unuseddeps: keep
"//validator/validators:timestamp", # unuseddeps: keep
"@@protobuf~//java/core", # unuseddeps: keep
"@com_google_googleapis//google/rpc/context:attribute_context_java_proto", # unuseddeps: keep
"@maven//:com_google_guava_guava", # unuseddeps: keep
"@maven//:com_google_protobuf_protobuf_java", # unuseddeps: keep
"@maven//:com_google_protobuf_protobuf_java_util", # unuseddeps: keep
],
)
2 changes: 1 addition & 1 deletion codelab/src/main/codelab/solutions/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ java_library(
"//validator/validators:homogeneous_literal",
"//validator/validators:regex",
"//validator/validators:timestamp",
"@@protobuf~//java/core",
"@com_google_googleapis//google/rpc/context:attribute_context_java_proto",
"@maven//:com_google_guava_guava",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_protobuf_protobuf_java_util",
],
)
6 changes: 3 additions & 3 deletions codelab/src/test/codelab/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ java_test(
"//codelab",
"//common",
"//common/types",
"@@protobuf~//java/core",
"@com_google_googleapis//google/rpc/context:attribute_context_java_proto",
"@maven//:com_google_guava_guava",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_testparameterinjector_test_parameter_injector",
"@maven//:junit_junit",
],
Expand Down Expand Up @@ -60,9 +60,9 @@ java_test(
"//:java_truth",
"//codelab",
"//common",
"@@protobuf~//java/core",
"@com_google_googleapis//google/rpc/context:attribute_context_java_proto",
"@maven//:com_google_guava_guava",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_testparameterinjector_test_parameter_injector",
"@maven//:junit_junit",
],
Expand Down Expand Up @@ -93,9 +93,9 @@ java_test(
"//:java_truth",
"//codelab",
"//common",
"@@protobuf~//java/core",
"@com_google_googleapis//google/rpc/context:attribute_context_java_proto",
"@maven//:com_google_guava_guava",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_protobuf_protobuf_java_util",
"@maven//:com_google_testparameterinjector_test_parameter_injector",
"@maven//:junit_junit",
Expand Down
6 changes: 3 additions & 3 deletions codelab/src/test/codelab/solutions/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ java_test(
"//codelab:solutions",
"//common",
"//common/types",
"@@protobuf~//java/core",
"@com_google_googleapis//google/rpc/context:attribute_context_java_proto",
"@maven//:com_google_guava_guava",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_testparameterinjector_test_parameter_injector",
"@maven//:junit_junit",
],
Expand All @@ -56,9 +56,9 @@ java_test(
"//:java_truth",
"//codelab:solutions",
"//common",
"@@protobuf~//java/core",
"@com_google_googleapis//google/rpc/context:attribute_context_java_proto",
"@maven//:com_google_guava_guava",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_testparameterinjector_test_parameter_injector",
"@maven//:junit_junit",
],
Expand Down Expand Up @@ -87,9 +87,9 @@ java_test(
"//:java_truth",
"//codelab:solutions",
"//common",
"@@protobuf~//java/core",
"@com_google_googleapis//google/rpc/context:attribute_context_java_proto",
"@maven//:com_google_guava_guava",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_protobuf_protobuf_java_util",
"@maven//:com_google_testparameterinjector_test_parameter_injector",
"@maven//:junit_junit",
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/java/dev/cel/common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ java_library(
"//common/types",
"//common/types:cel_types",
"//common/types:type_providers",
"@@protobuf~//java/core",
"@cel_spec//proto/cel/expr:expr_java_proto",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
"@maven//:com_google_protobuf_protobuf_java",
],
)

Expand Down Expand Up @@ -193,9 +193,9 @@ java_library(
tags = [
],
deps = [
"@@protobuf~//java/core",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_protobuf_protobuf_java_util",
],
)
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/java/dev/cel/common/ast/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ java_library(
deps = [
"//:auto_value",
"//common/annotations",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
"@maven//:org_jspecify_jspecify",
Expand Down Expand Up @@ -98,7 +98,7 @@ java_library(
deps = [
":ast",
"//common/annotations",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_guava_guava",
],
)
Expand Down
18 changes: 9 additions & 9 deletions common/src/main/java/dev/cel/common/internal/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ java_library(
"//:auto_value",
"//common/annotations",
"//common/ast",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
"@maven//:org_antlr_antlr4_runtime",
Expand Down Expand Up @@ -105,7 +105,7 @@ java_library(
],
deps = [
"//common/annotations",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_guava_guava",
],
)
Expand All @@ -126,7 +126,7 @@ java_library(
"//common:proto_json_adapter",
"//common:runtime_exception",
"//common/annotations",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@cel_spec//proto/cel/expr:expr_java_proto",
"@maven//:com_google_code_findbugs_annotations",
"@maven//:com_google_errorprone_error_prone_annotations",
Expand All @@ -144,7 +144,7 @@ java_library(
":dynamic_proto",
"//:auto_value",
"//common/annotations",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
"@maven//:org_jspecify_jspecify",
Expand All @@ -160,7 +160,7 @@ java_library(
],
deps = [
"//:auto_value",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
],
Expand All @@ -184,7 +184,7 @@ java_library(
],
deps = [
"//common/annotations",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_guava_guava",
],
)
Expand All @@ -199,7 +199,7 @@ java_library(
":default_instance_message_factory",
":proto_message_factory",
"//common/annotations",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
],
)

Expand All @@ -210,7 +210,7 @@ java_library(
],
deps = [
":cel_descriptor_pools",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
],
Expand All @@ -225,7 +225,7 @@ java_library(
":well_known_proto",
"//common",
"//common/annotations",
"@@protobuf~//java/core",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
],
Expand Down
Loading

0 comments on commit 0361d02

Please sign in to comment.