Skip to content

Commit 4a89cfc

Browse files
committed
Fix file paths in generated source jars
1 parent 253c24f commit 4a89cfc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kt_jvm_grpc.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ def _invoke_generator(ctx, proto_dep, output_dir):
2020
progress_message = "Generating Kotlin gRPC extensions for %s" % proto_dep.label,
2121
)
2222

23+
def _map_relative_path(file):
24+
return "{dest}={src}".format(dest = file.tree_relative_path, src = file.path)
25+
2326
def _build_srcjar(ctx, proto_dep, input_dir, source_jar):
2427
args = ctx.actions.args()
2528
args.add("c")
2629
args.add(source_jar.path)
27-
args.add_all(depset([input_dir]))
30+
args.add_all(depset([input_dir]), map_each = _map_relative_path)
2831
ctx.actions.run(
2932
outputs = [source_jar],
3033
inputs = [input_dir],

0 commit comments

Comments
 (0)