perfetto: add proto lite java config to bazel build

Change-Id: I4b756f8e58eeb43a9b844fb65f539ea1b34f3ce8
diff --git a/BUILD b/BUILD
index d609792..e32422d 100644
--- a/BUILD
+++ b/BUILD
@@ -24,6 +24,7 @@
     "perfetto_cc_protocpp_library",
     "perfetto_cc_protozero_library",
     "perfetto_java_proto_library",
+    "perfetto_java_lite_proto_library",
     "perfetto_proto_library",
     "perfetto_py_binary",
     "perfetto_gensignature_internal_only",
@@ -3232,6 +3233,13 @@
     ],
 )
 
+perfetto_java_lite_proto_library(
+    name = "protos_perfetto_config_merged_config_java_lite",
+    deps = [
+        ":protos_perfetto_config_merged_config_protos",
+    ],
+)
+
 perfetto_gensignature_internal_only(
     name = "trace_processor_sig",
     srcs = [
diff --git a/BUILD.extras b/BUILD.extras
index f9a85d3..6365f5c 100644
--- a/BUILD.extras
+++ b/BUILD.extras
@@ -50,6 +50,13 @@
     ],
 )
 
+perfetto_java_lite_proto_library(
+    name = "protos_perfetto_config_merged_config_java_lite",
+    deps = [
+        ":protos_perfetto_config_merged_config_protos",
+    ],
+)
+
 perfetto_gensignature_internal_only(
     name = "trace_processor_sig",
     srcs = [
diff --git a/bazel/rules.bzl b/bazel/rules.bzl
index 498f34a..65ff4b0 100644
--- a/bazel/rules.bzl
+++ b/bazel/rules.bzl
@@ -64,6 +64,10 @@
     if not _rule_override("java_proto_library", **kwargs):
         native.java_proto_library(**kwargs)
 
+def perfetto_java_lite_proto_library(**kwargs):
+    if not _rule_override("java_lite_proto_library", **kwargs):
+        native.java_lite_proto_library(**kwargs)
+
 # +----------------------------------------------------------------------------+
 # | Misc rules.                                                                |
 # +----------------------------------------------------------------------------+
diff --git a/bazel/standalone/perfetto_cfg.bzl b/bazel/standalone/perfetto_cfg.bzl
index d441c06..68a0ead 100644
--- a/bazel/standalone/perfetto_cfg.bzl
+++ b/bazel/standalone/perfetto_cfg.bzl
@@ -77,9 +77,12 @@
         cc_binary = None,
         cc_library = None,
         cc_proto_library = None,
+
         # Supporting java rules pulls in the JDK and generally is not something
         # we need for most embedders.
         java_proto_library = _noop_override,
+        java_lite_proto_library = _noop_override,
+
         proto_library = None,
         py_binary = None,
 
diff --git a/tools/gen_bazel b/tools/gen_bazel
index 00568b2..ce82c1e 100755
--- a/tools/gen_bazel
+++ b/tools/gen_bazel
@@ -390,6 +390,7 @@
     "perfetto_cc_protocpp_library",
     "perfetto_cc_protozero_library",
     "perfetto_java_proto_library",
+    "perfetto_java_lite_proto_library",
     "perfetto_proto_library",
     "perfetto_py_binary",
     "perfetto_gensignature_internal_only",