Skip to content

Commit f1efc00

Browse files
l46kokcopybara-github
authored andcommitted
Bring in WORKSPACE dependencies for supporting CelLiteDescriptor codegen
PiperOrigin-RevId: 738454219
1 parent e28f56a commit f1efc00

File tree

2 files changed

+45
-6
lines changed

2 files changed

+45
-6
lines changed

WORKSPACE

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup")
119119
rules_jvm_external_setup()
120120

121121
load("@rules_jvm_external//:defs.bzl", "maven_install")
122+
load("//:maven_utils.bzl", "maven_artifact_compile_only", "maven_artifact_test_only")
122123

123124
### end of rules_jvm_external setup
124125

@@ -129,22 +130,25 @@ maven_install(
129130
artifacts = [
130131
"com.google.auto.value:auto-value:1.11.0",
131132
"com.google.auto.value:auto-value-annotations:1.11.0",
132-
"com.google.code.findbugs:annotations:3.0.1",
133-
"com.google.errorprone:error_prone_annotations:2.36.0",
134133
"com.google.guava:guava:33.4.0-jre",
135134
"com.google.guava:guava-testlib:33.4.0-jre",
136135
"com.google.protobuf:protobuf-java:4.29.3",
137136
"com.google.protobuf:protobuf-java-util:4.29.3",
138137
"com.google.re2j:re2j:1.8",
139-
"com.google.testparameterinjector:test-parameter-injector:1.18",
140-
"com.google.truth.extensions:truth-java8-extension:1.4.4",
141-
"com.google.truth.extensions:truth-proto-extension:1.4.4",
142-
"com.google.truth:truth:1.4.4",
143138
"info.picocli:picocli:4.7.6",
144139
"org.antlr:antlr4-runtime:" + ANTLR4_VERSION,
140+
"info.picocli:picocli:4.7.6",
141+
"org.freemarker:freemarker:2.3.33",
145142
"org.jspecify:jspecify:1.0.0",
146143
"org.threeten:threeten-extra:1.8.0",
147144
"org.yaml:snakeyaml:2.3",
145+
maven_artifact_test_only("com.google.testparameterinjector", "test-parameter-injector", "1.18"),
146+
maven_artifact_test_only("com.google.truth", "truth", "1.4.4"),
147+
maven_artifact_test_only("com.google.truth.extensions", "truth-java8-extension", "1.4.4"),
148+
maven_artifact_test_only("com.google.truth.extensions", "truth-proto-extension", "1.4.4"),
149+
maven_artifact_test_only("com.google.truth.extensions", "truth-liteproto-extension", "1.4.4"),
150+
maven_artifact_compile_only("com.google.code.findbugs", "annotations", "3.0.1"),
151+
maven_artifact_compile_only("com.google.errorprone", "error_prone_annotations", "2.36.0"),
148152
],
149153
repositories = [
150154
"https://maven.google.com",

maven_utils.bzl

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright 2025 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+
"""Utility functions for installing maven artifact in Bazel WORKSPACE."""
16+
17+
load("@rules_jvm_external//:specs.bzl", "maven")
18+
19+
def maven_artifact_compile_only(group, artifact, version):
20+
"""Installs the maven JAR as a compile-time only dependency (ex: tools, codegen)."""
21+
return maven.artifact(
22+
artifact = artifact,
23+
group = group,
24+
neverlink = True,
25+
version = version,
26+
)
27+
28+
def maven_artifact_test_only(group, artifact, version):
29+
"""Installs the maven JAR as a test-time only dependency (ex: tools, codegen)."""
30+
return maven.artifact(
31+
artifact = artifact,
32+
group = group,
33+
testonly = True,
34+
version = version,
35+
)

0 commit comments

Comments
 (0)