Skip to content

Commit 9354ef3

Browse files
cushonDagger Team
authored andcommitted
Use java_single_jar instead of a java_binary to roll up deps
RELNOTES=n/a PiperOrigin-RevId: 862338970
1 parent f9deeef commit 9354ef3

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

java/dagger/testing/compile/macros.bzl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
# limitations under the License.
1414
"""Macros for building compiler tests."""
1515

16-
load("@rules_java//java:defs.bzl", "java_binary", "java_test")
16+
load("@rules_java//java:defs.bzl", "java_test")
17+
load("@rules_java//java:java_single_jar.bzl", "java_single_jar")
1718
load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")
1819

1920
def compiler_test(name, size = "large", compiler_deps = None, **kwargs):
@@ -35,13 +36,13 @@ def compiler_test(name, size = "large", compiler_deps = None, **kwargs):
3536

3637
# This JAR is loaded at runtime and contains the dependencies used by the compiler during tests.
3738
# We separate these dependencies from the java_test dependencies to avoid 1 version violations.
38-
java_binary(
39+
java_single_jar(
3940
name = name + "_compiler_deps",
4041
testonly = 1,
4142
tags = ["notap"],
4243
visibility = ["//visibility:private"],
43-
main_class = "Object.class",
44-
runtime_deps = compiler_deps,
44+
deps = compiler_deps,
45+
output = name + "_compiler_deps_deploy.jar",
4546
)
4647

4748
# Add the compiler deps jar, generated above, to the test's data.

0 commit comments

Comments
 (0)