|
| 1 | +# Copyright 2024 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +module( |
| 16 | + name = "cel_java" |
| 17 | +) |
| 18 | + |
| 19 | +bazel_dep(name = "bazel_skylib", version = "1.4.2") |
| 20 | +bazel_dep(name = "rules_jvm_external", version = "6.0") |
| 21 | +bazel_dep(name = "protobuf", repo_name="com_google_protobuf", version = "23.1") |
| 22 | +bazel_dep(name = "rules_pkg", version = "0.10.1") |
| 23 | +bazel_dep(name = "rules_license", version = "0.0.8") |
| 24 | +bazel_dep(name = "rules_java", version = "7.4.0") |
| 25 | +bazel_dep(name = "cel-spec", repo_name="cel_spec", version = "0.14.0") |
| 26 | + |
| 27 | +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") |
| 28 | + |
| 29 | +maven.install( |
| 30 | + # keep sorted |
| 31 | + artifacts = [ |
| 32 | + "com.google.api.grpc:proto-google-common-protos:2.27.0", |
| 33 | + "com.google.auto.value:auto-value-annotations:1.10.4", |
| 34 | + "com.google.auto.value:auto-value:1.10.4", |
| 35 | + "com.google.code.findbugs:annotations:3.0.1", |
| 36 | + "com.google.errorprone:error_prone_annotations:2.23.0", |
| 37 | + "com.google.guava:guava-testlib:33.0.0-jre", |
| 38 | + "com.google.guava:guava:33.0.0-jre", |
| 39 | + "com.google.protobuf:protobuf-java-util:3.24.4", |
| 40 | + "com.google.protobuf:protobuf-java:3.24.4", |
| 41 | + "com.google.re2j:re2j:1.7", |
| 42 | + "com.google.testparameterinjector:test-parameter-injector:1.15", |
| 43 | + "com.google.truth.extensions:truth-java8-extension:1.4.0", |
| 44 | + "com.google.truth.extensions:truth-proto-extension:1.4.0", |
| 45 | + "com.google.truth:truth:1.4.0", |
| 46 | + "org.antlr:antlr4-runtime:4.11.1", |
| 47 | + "org.jspecify:jspecify:0.2.0", |
| 48 | + "org.threeten:threeten-extra:1.7.2", |
| 49 | + ], |
| 50 | + repositories = [ |
| 51 | + "https://maven.google.com", |
| 52 | + "https://repo1.maven.org/maven2", |
| 53 | + ], |
| 54 | +) |
| 55 | +use_repo(maven, "maven") |
| 56 | + |
| 57 | +non_module_dependencies = use_extension("//:repositories.bzl", "non_module_dependencies") |
| 58 | +use_repo(non_module_dependencies, "antlr4_jar") |
| 59 | +use_repo(non_module_dependencies, "bazel_common") |
| 60 | + |
| 61 | +# Note: We aren't able to use Bazel Central Registry for googleapis |
| 62 | +# until https://github.com/bazelbuild/rules_jvm_external/issues/1048 is resolved. |
| 63 | +GOOGLE_APIS_VERSION = "d73a41615b101c34c58b3534c2cc7ee1d89cccb0" |
| 64 | + |
| 65 | +bazel_dep(name = "com_google_googleapis", version = GOOGLE_APIS_VERSION) |
| 66 | +archive_override( |
| 67 | + module_name = "com_google_googleapis", |
| 68 | + integrity = "sha256-sOd1u3SXtn/7CtnH6dxze8ZEkSkRsOJHTusK/STVi0c=", |
| 69 | + patch_strip = 1, |
| 70 | + patches = [ |
| 71 | + # See https://github.com/bazelbuild/rules_go/issues/3685 |
| 72 | + "googleapis_add_bzlmod_support.patch" |
| 73 | + ], |
| 74 | + strip_prefix = "googleapis-" + GOOGLE_APIS_VERSION, |
| 75 | + urls = [ |
| 76 | + "https://github.com/googleapis/googleapis/archive/%s.zip" % GOOGLE_APIS_VERSION |
| 77 | + ], |
| 78 | +) |
| 79 | + |
| 80 | +switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules") |
| 81 | +switched_rules.use_languages(java = True) |
| 82 | +use_repo(switched_rules, "com_google_googleapis_imports") |
| 83 | + |
0 commit comments