--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/34dd5bdf-43c9-4fda-9ce9-f057ac011771n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/2bb05d88-5f8f-4d39-beac-077292a09fe4n%40googlegroups.com.
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_java//java:defs.bzl", "java_proto_library")
def java_protobuf_library(sources, name, dependencies=None, **kwargs):
proto_name = "{}_proto".format(name)
proto_kwargs = {
"name": proto_name,
"sources": sources,
"strip_import_prefix": "//" + native.package_name(), // this is dependent on your repo structure
}
proto_library(**proto_kwargs) // I modified this slightly because internally we use a helper function.
proto_dep = ":{}".format(proto_name)
java_proto_kwargs = {
"name": name,
"dependencies": [proto_dep],
}
java_proto_kwargs.update(kwargs)
java_proto_library(**java_proto_kwargs) // I modified this slightly because internally we use a helper function.
Yes, could you share code snippets on how you make the following targets work in the translation layer?1. Bundlesjvm_app(name='ria-bundle',dependencies=[':ria-server'],bundles=[bundle(relative_to='resources/', fileset=rglobs('resources/*')),bundle(fileset=['ria_server.sh', 'log_config'])])2. protobufsjava_protobuf_library(name='user-profile',sources=['userprofile.proto'],)3. Shadingjvm_binary(name='dim-lookup-client-1.0.0-SNAPSHOT',dependencies=[':dimlookup','3rdparty/java/org/codehaus/jackson:core','3rdparty/java/org/codehaus/jackson:mapper'],shading_rules=[shading_relocate('com.maxmind.**', 'com.xxx.relocated.maxmind.@1'),shading_relocate('com.google.**', 'com.xxx.relocated.google.@1'),])ThanksKrish
669-241-9356