Skip to content

Commit

Permalink
Fix deprecated options in pack_sources
Browse files Browse the repository at this point in the history
And declare the file ourselves
  • Loading branch information
tmccombs committed Sep 20, 2023
1 parent f2ab6e0 commit 138f5ea
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rules/private/phases/phase_javainfo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,16 @@ def phase_javainfo(ctx, g):
java_toolchain = find_java_toolchain(ctx, ctx.attr._java_toolchain),
)

source_jar_name = ctx.outputs.jar.basename.replace(".jar", "-src.jar")
output_source_jar = ctx.actions.declare_file(
source_jar_name,
sibling = ctx.outputs.jar,
)

source_jar = java_common.pack_sources(
ctx.actions,
output_jar = ctx.outputs.jar,
output_source_jar = output_source_jar,
sources = ctx.files.srcs,
host_javabase = find_java_runtime_toolchain(ctx, ctx.attr._host_javabase),
java_toolchain = find_java_toolchain(ctx, ctx.attr._java_toolchain),
)

Expand Down

0 comments on commit 138f5ea

Please sign in to comment.