@@ -296,9 +296,6 @@ _kt_jvm_proto_library_helper = rule(
296
296
proto_deps = attr .label_list (
297
297
providers = [ProtoInfo ],
298
298
),
299
- deps = attr .label_list (
300
- providers = [JavaInfo ],
301
- ),
302
299
exports = attr .label_list (
303
300
allow_rules = ["java_proto_library" ],
304
301
),
@@ -321,7 +318,8 @@ _kt_jvm_proto_library_helper = rule(
321
318
322
319
def kt_jvm_proto_library (
323
320
name ,
324
- deps = None ,
321
+ proto_deps = None ,
322
+ deps = [],
325
323
java_deps = None ,
326
324
tags = None ,
327
325
testonly = None ,
@@ -331,9 +329,7 @@ def kt_jvm_proto_library(
331
329
flavor = None ,
332
330
deprecation = None ,
333
331
features = []):
334
- """
335
- This rule accepts any number of proto_library targets in "deps", translates them to Kotlin and
336
- returns the compiled Kotlin.
332
+ """This macro takes protos, Java deps, and Kotlin deps, and returns the compiled Kotlin.
337
333
338
334
See also https://developers.google.com/protocol-buffers/docs/kotlintutorial for how to interact
339
335
with the generated Kotlin representation.
@@ -347,8 +343,9 @@ def kt_jvm_proto_library(
347
343
348
344
Args:
349
345
name: A name for the target
350
- deps: One or more proto_library targets to turn into Kotlin.
351
- java_deps: (optional) java_proto_library targets corresponding to deps
346
+ proto_deps: One or more proto_library targets to turn into Kotlin
347
+ deps: One or more Java/Kotlin library targets to depend on
348
+ java_deps: (optional) java_proto_library targets corresponding to proto_deps
352
349
tags: Standard attribute
353
350
testonly: Standard attribute
354
351
compatible_with: Standard attribute
@@ -367,7 +364,7 @@ def kt_jvm_proto_library(
367
364
if flavor == "lite" :
368
365
native .java_lite_proto_library (
369
366
name = java_proto_target [1 :],
370
- deps = deps ,
367
+ deps = proto_deps ,
371
368
testonly = testonly ,
372
369
compatible_with = compatible_with ,
373
370
visibility = ["//visibility:private" ],
@@ -379,7 +376,7 @@ def kt_jvm_proto_library(
379
376
else :
380
377
native .java_proto_library (
381
378
name = java_proto_target [1 :],
382
- deps = deps ,
379
+ deps = proto_deps ,
383
380
testonly = testonly ,
384
381
compatible_with = compatible_with ,
385
382
visibility = ["//visibility:private" ],
@@ -394,8 +391,7 @@ def kt_jvm_proto_library(
394
391
helper_target = ":%s_DO_NOT_DEPEND_kt_proto" % name
395
392
_kt_jvm_proto_library_helper (
396
393
name = helper_target [1 :],
397
- proto_deps = deps ,
398
- deps = java_protos ,
394
+ proto_deps = proto_deps ,
399
395
testonly = testonly ,
400
396
compatible_with = compatible_with ,
401
397
visibility = ["//visibility:private" ],
@@ -410,7 +406,7 @@ def kt_jvm_proto_library(
410
406
srcs = [helper_target + ".srcjar" ],
411
407
deps = [
412
408
"@maven//:com_google_protobuf_protobuf_kotlin" ,
413
- ] + java_protos ,
409
+ ] + java_protos + deps ,
414
410
exports = java_exports ,
415
411
testonly = testonly ,
416
412
compatible_with = compatible_with ,
0 commit comments