File tree Expand file tree Collapse file tree
example/golden/testdata/scala Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11exports_files(["config.yaml"])
22
33# gazelle:proto_language scala enabled true
4+ # gazelle:proto_rule proto_scala_library attr exports @com_google_protobuf//:protobuf_java
45# gazelle:proto_rule proto_scala_library option --plugins=protoc-gen-scala
56# gazelle:proto_rule grpc_scala_library option --plugins=protoc-gen-akka-grpc
Original file line number Diff line number Diff line change 11exports_files(["config.yaml"])
22
33# gazelle:proto_language scala enabled true
4+ # gazelle:proto_rule proto_scala_library attr exports @com_google_protobuf//:protobuf_java
45# gazelle:proto_rule proto_scala_library option --plugins=protoc-gen-scala
56# gazelle:proto_rule grpc_scala_library option --plugins=protoc-gen-akka-grpc
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ proto_scala_library(
2626 name = "proto_proto_scala_library",
2727 srcs = ["proto_scala.srcjar"],
2828 visibility = ["//visibility:public"],
29+ exports = ["@com_google_protobuf//:protobuf_java"],
2930 deps = [
3031 "@com_google_protobuf//:protobuf_java",
3132 "@maven_scala//:com_thesamet_scalapb_lenses_2_12",
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ proto_scala_library(
6060 name = "syntax_proto_scala_library",
6161 srcs = ["syntax_scala.srcjar"],
6262 visibility = ["//visibility:public"],
63+ exports = ["@com_google_protobuf//:protobuf_java"],
6364 deps = [
6465 "//lib:scala",
6566 "//proto:proto_proto_scala_library",
Original file line number Diff line number Diff line change @@ -61,8 +61,11 @@ func (s *scalaLibrary) Name() string {
6161// KindInfo implements part of the LanguageRule interface.
6262func (s * scalaLibrary ) KindInfo () rule.KindInfo {
6363 return rule.KindInfo {
64- MergeableAttrs : map [string ]bool {"srcs" : true },
65- ResolveAttrs : map [string ]bool {"deps" : true },
64+ MergeableAttrs : map [string ]bool {
65+ "srcs" : true ,
66+ "exports" : true ,
67+ },
68+ ResolveAttrs : map [string ]bool {"deps" : true },
6669 }
6770}
6871
@@ -171,6 +174,11 @@ func (s *scalaLibraryRule) Rule(otherGen ...*rule.Rule) *rule.Rule {
171174 newRule .SetAttr ("deps" , deps )
172175 }
173176
177+ exports := s .ruleConfig .GetAttr ("exports" )
178+ if len (exports ) > 0 {
179+ newRule .SetAttr ("exports" , exports )
180+ }
181+
174182 visibility := s .Visibility ()
175183 if len (visibility ) > 0 {
176184 newRule .SetAttr ("visibility" , visibility )
You can’t perform that action at this time.
0 commit comments