File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ visibility(PROJECT_VISIBILITY)
2626
2727def _aspect_attrs ():
2828 """Attrs of the rule requiring traversal by the aspect."""
29- return ["deps" , "_aspect_proto_toolchain_for_javalite" ]
29+ return ["deps" , "_aspect_proto_toolchain_for_javalite" , "_proto_toolchain_for_javalite" ]
3030
3131def _adapt (target , ctx ):
3232 """Adapts the rule and target data.
@@ -40,19 +40,23 @@ def _adapt(target, ctx):
4040 """
4141 if not ctx .rule .attr .deps :
4242 return []
43+ if getattr (ctx .rule .attr , "_aspect_proto_toolchain_for_javalite" ):
44+ toolchain_dep = [ctx .rule .attr ._aspect_proto_toolchain_for_javalite ]
45+ else :
46+ toolchain_dep = [ctx .rule .attr ._proto_toolchain_for_javalite ]
4347 return [
4448 providers .make_mi_android_dex_info (
4549 deps = providers .collect (
4650 MIAndroidDexInfo ,
4751 ctx .rule .attr .deps ,
48- [ ctx . rule . attr . _aspect_proto_toolchain_for_javalite ] ,
52+ toolchain_dep ,
4953 ),
5054 ),
5155 providers .make_mi_java_resources_info (
5256 deps = providers .collect (
5357 MIJavaResourcesInfo ,
5458 ctx .rule .attr .deps ,
55- [ ctx . rule . attr . _aspect_proto_toolchain_for_javalite ] ,
59+ toolchain_dep ,
5660 ),
5761 ),
5862 ]
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ _ATTR_ASPECTS = [
3535 "_build_stamp_deps" , # for build stamp runtime class deps
3636 "_build_stamp_mergee_manifest_lib" , # for empty build stamp Service class implementation
3737 "_desugared_lib_config" , # For java8 desugaring config file
38+ "_proto_toolchain_for_javalite" , # To get from proto_library through proto_lang_toolchain rule to proto runtime library.
3839 "_toolchain" , # For _java_lite_grpc_library
3940 "deps" ,
4041 "exports" ,
You can’t perform that action at this time.
0 commit comments