Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit 5c6004c

Browse files
committed
Order singlejar input jars in the same manner as original code
1 parent 3c91555 commit 5c6004c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rules/scala/private/phases.bzl

+5-5
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,7 @@ def phase_singlejar(ctx, g):
291291
args.add("--exclude_build_data")
292292
args.add("--normalize")
293293

294-
for file in [f for f in ctx.files.resource_jars if f.extension.lower() in ["jar"]]:
295-
args.add("--sources")
296-
args.add(file)
297-
298-
for v in [getattr(g, k) for k in dir(g)[::-1] if k not in ["to_json", "to_proto"]]:
294+
for v in [getattr(g, k) for k in dir(g) if k not in ["to_json", "to_proto"]]:
299295
if hasattr(v, "jar"):
300296
jar = getattr(v, "jar")
301297
args.add("--sources", jar)
@@ -306,6 +302,10 @@ def phase_singlejar(ctx, g):
306302
# any declared outputs are missing from previous phases.
307303
inputs.extend(getattr(v, "outputs"))
308304

305+
for file in [f for f in ctx.files.resource_jars if f.extension.lower() in ["jar"]]:
306+
args.add("--sources")
307+
args.add(file)
308+
309309
args.add("--output", ctx.outputs.jar)
310310
args.add("--warn_duplicate_resources")
311311
args.set_param_file_format("multiline")

0 commit comments

Comments
 (0)