build: add an explicit dependency on the JDK
@@ -89,6 +89,7 @@ def _extract_java(target, ctx):
inputs = depset([xa, ctx.file._java_aspect_vnames_config], transitive = deps),
executable = ctx.executable._java_bazel_extractor,
arguments = [extract_args],
+ tools = ctx.attr._java_runtime[java_common.JavaRuntimeInfo].files,
)
return kzip
@@ -106,17 +107,22 @@ extract_java_aspect = aspect(
"_write_extra_action": attr.label(
default = Label("@io_kythe//kythe/go/util/tools/write_extra_action"),
executable = True,
- cfg = "host",
+ cfg = "exec",
),
"_java_bazel_extractor": attr.label(
default = Label("@io_kythe//kythe/java/com/google/devtools/kythe/extractors/java/bazel:java_extractor"),
executable = True,
- cfg = "host",
+ cfg = "exec",
),
"_java_aspect_vnames_config": attr.label(
default = Label("//external:vnames_config"),
allow_single_file = True,
),
+ "_java_runtime": attr.label(
+ default = Label("@bazel_tools//tools/jdk:current_java_runtime"),
+ cfg = "exec",
+ allow_files = True,
+ ),
},
)
