Skip to content

Commit

Permalink
Support optional source_jar (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bencodes authored Feb 17, 2021
1 parent 8a8e884 commit 0478588
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kotlin/internal/jvm/impl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,16 @@ def kt_jvm_import_impl(ctx):
jars = [artifact],
),
)

return struct(
kt = kt_info,
providers = [
DefaultInfo(
files = depset(direct = [artifact.class_jar]),
runfiles = ctx.runfiles(files = [artifact.class_jar, artifact.source_jar]),
runfiles = ctx.runfiles(
# Append class jar with the optional sources jar
files = [artifact.class_jar] + [artifact.source_jar] if artifact.source_jar else []
),
),
JavaInfo(
output_jar = artifact.class_jar,
Expand Down

0 comments on commit 0478588

Please sign in to comment.