Skip to content

Commit

Permalink
fix(bazel): retain certain google/api deps (#63)
Browse files Browse the repository at this point in the history
Fixes #62
  • Loading branch information
noahdietz committed Aug 17, 2021
1 parent 15c1f88 commit 455392f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ private Set<String> mapJavaGapicDeps(Set<String> protoImports) {
|| protoImport.endsWith(":policy_proto")
|| protoImport.endsWith(":options_proto")) {
javaImports.add(replaceLabelName(protoImport, ":iam_java_proto"));
} else if (protoImport.endsWith(":service_proto")
|| protoImport.endsWith(":httpbody_proto")) {
} else if (protoImport.startsWith("//google/api:")) {
javaImports.add(replaceLabelName(protoImport, ":api_java_proto"));
} else if (protoImport.endsWith(":location_proto")) {
javaImports.add("//google/cloud/location:location_java_proto");
Expand Down Expand Up @@ -325,6 +324,10 @@ private Set<String> mapGoGapicDeps(Set<String> protoImports) {
goImports.add(replaceLabelName(protoImport, ":serviceconfig_go_proto"));
} else if (protoImport.endsWith(":httpbody_proto")) {
goImports.add(replaceLabelName(protoImport, ":httpbody_go_proto"));
} else if (protoImport.endsWith(":monitored_resource_proto")) {
goImports.add(replaceLabelName(protoImport, ":monitoredres_go_proto"));
} else if (protoImport.endsWith(":metric_proto")) {
goImports.add(replaceLabelName(protoImport, ":metric_go_proto"));
}
}
return goImports;
Expand Down

0 comments on commit 455392f

Please sign in to comment.