Skip to content

Commit

Permalink
Merge pull request #53 from bazeltools/ramya/add-config-jars-to-curre…
Browse files Browse the repository at this point in the history
…nt-jars

Add config output jars to current_jars
  • Loading branch information
ramyanaga authored Jul 19, 2024
2 parents d935588 + 8953778 commit ea3ecc1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions jar_jar_aspect.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ShadedJars = provider(fields = [
"transitive_shaded",
])

ConfigJavaInfo = provider(fields = [
"config_java_info"
ExtraDependencyProviders = provider(fields = [
"extra_java_deps"
])

def merge_shaded_jars_info(shaded_jars):
Expand Down Expand Up @@ -67,9 +67,10 @@ def _jar_jar_aspect_impl(target, ctx):
current_jars.extend([e.class_jar for e in target[JavaInfo].java_outputs])
java_info_runtime_deps = []

if ConfigJavaInfo in target:
java_info_runtime_deps.append(target[ConfigJavaInfo].config_java_info)
#current_jars.extend([e.class_jar for e in target[ConfigJavaInfo].config_java_info.java_outputs])
if ExtraDependencyProviders in target:
for config in target[ExtraDependencyProviders].extra_java_deps:
java_info_runtime_deps.append(config.extra_java_deps)
current_jars.extend([e.class_jar for e in config.extra_java_deps.java_outputs])
toolchain_cfg = ctx.toolchains["//toolchains:toolchain_type"]
rules = toolchain_cfg.rules.files.to_list()[0]
duplicate_to_warn = toolchain_cfg.duplicate_class_to_warn
Expand Down

0 comments on commit ea3ecc1

Please # to comment.