Skip to content

Commit

Permalink
Use java to run singlejar
Browse files Browse the repository at this point in the history
  • Loading branch information
IljaKroonen committed Aug 20, 2018
1 parent 6e76e73 commit dbb69d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kotlin/internal/utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ rm -f {resources_jar_output}
def _maybe_make_srcsjar_action(ctx):
if len(ctx.files.srcs) > 0:
output_srcjar = ctx.actions.declare_file(ctx.label.name + "-sources.jar")
args = ["--output", output_srcjar.path]
args = ["-jar", str(ctx.executable._singlejar), "--output", output_srcjar.path]
for i in ctx.files.srcs:
args += ["--resources", i.path]

ctx.action(
mnemonic = "KotlinPackageSources",
inputs = ctx.files.srcs,
outputs = [output_srcjar],
executable = ctx.executable._singlejar,
executable = ctx.executable._java,
arguments = args,
progress_message="Creating Kotlin srcjar from %d srcs" % len(ctx.files.srcs),
)
Expand All @@ -162,15 +162,15 @@ def _maybe_make_srcsjar_action(ctx):

# PACKAGE JARS #################################################################################################################################################
def _fold_jars_action(ctx, output_jar, input_jars):
args=["--output", output_jar.path]
args=["-jar", ctx.executable._singlejar.path, "--output", output_jar.path]
for i in input_jars:
args += ["--sources", i.path]

ctx.action(
mnemonic = "KotlinFoldOutput",
inputs = input_jars,
outputs = [output_jar],
executable = ctx.executable._singlejar,
executable = ctx.executable._java,
arguments = args,
progress_message="Merging Kotlin output jar " + output_jar.short_path
)
Expand Down

0 comments on commit dbb69d8

Please sign in to comment.