diff options
author | Kotlin Google Eng <kotlin-google-eng@google.com> | 2022-10-04 14:07:20 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-10-04 14:07:50 -0700 |
commit | ca948bb14dd2ca0274dbc58b3c5cbec121916539 (patch) | |
tree | f77d60bd1c35a5f8414b7a15f8b89219d7ef3ddf | |
parent | da42937b76bd3a6c28841284515a426e586c9dce (diff) | |
download | bazelbuild-kotlin-rules-ca948bb14dd2ca0274dbc58b3c5cbec121916539.tar.gz |
internal change
PiperOrigin-RevId: 478878994
-rw-r--r-- | kotlin/friend_jars.bzl | 11 | ||||
-rw-r--r-- | kotlin/traverse_exports.bzl | 5 |
2 files changed, 14 insertions, 2 deletions
diff --git a/kotlin/friend_jars.bzl b/kotlin/friend_jars.bzl index 4efb435..a75f43d 100644 --- a/kotlin/friend_jars.bzl +++ b/kotlin/friend_jars.bzl @@ -64,3 +64,14 @@ kt_friend_jars_visitor = struct( finish_expansion = None, process_unvisited_target = None, ) + +def _get_output_labels(target, _): + return [target.label] + +kt_friend_labels_visitor = struct( + name = "friend_labels", + visit_target = _get_output_labels, + filter_edge = _is_eligible_friend, + finish_expansion = None, + process_unvisited_target = None, +) diff --git a/kotlin/traverse_exports.bzl b/kotlin/traverse_exports.bzl index 635f6cb..a8ce86f 100644 --- a/kotlin/traverse_exports.bzl +++ b/kotlin/traverse_exports.bzl @@ -17,7 +17,7 @@ load(":compiler_plugin.bzl", "kt_compiler_plugin_visitor") load(":direct_jdeps.bzl", "kt_direct_jdeps_visitor") load(":forbidden_deps.bzl", "kt_forbidden_deps_visitor") -load(":friend_jars.bzl", "kt_friend_jars_visitor") +load(":friend_jars.bzl", "kt_friend_jars_visitor", "kt_friend_labels_visitor") load(":java_plugin.internal.bzl", "java_plugin_visitor") # java_xxx_proto_library don't populate java_outputs but we can get them through @@ -44,6 +44,7 @@ _VISITORS = [ kt_direct_jdeps_visitor, kt_compiler_plugin_visitor, kt_friend_jars_visitor, + kt_friend_labels_visitor, java_plugin_visitor, ] @@ -64,7 +65,7 @@ def _aspect_impl(target, ctx): if not (JavaInfo in target): # Ignore non-JVM targets. This also chops-up the # traversal domain at these targets. - # TODO: Supoprt non-JVM targets for KMP + # TODO: Support non-JVM targets for KMP return _EMPTY_KT_TRAVERSE_EXPORTS_INFO exports = [] |