diff --git a/core/java_common.mk b/core/java_common.mk index a23d92d9f..dfe75f325 100644 --- a/core/java_common.mk +++ b/core/java_common.mk @@ -86,6 +86,8 @@ ifeq ($(LOCAL_PROTOC_OPTIMIZE_TYPE),micro) $(proto_java_srcjar): $(HOST_OUT_EXECUTABLES)/protoc-gen-javamicro else ifeq ($(LOCAL_PROTOC_OPTIMIZE_TYPE),nano) $(proto_java_srcjar): PRIVATE_PROTO_JAVA_OUTPUT_OPTION := --javanano_out + $(proto_java_srcjar): PRIVATE_PROTOC_FLAGS += --plugin=$(HOST_OUT_EXECUTABLES)/protoc-gen-javanano + $(proto_java_srcjar): $(HOST_OUT_EXECUTABLES)/protoc-gen-javanano else ifeq ($(LOCAL_PROTOC_OPTIMIZE_TYPE),stream) $(proto_java_srcjar): PRIVATE_PROTO_JAVA_OUTPUT_OPTION := --javastream_out $(proto_java_srcjar): PRIVATE_PROTOC_FLAGS += --plugin=$(HOST_OUT_EXECUTABLES)/protoc-gen-javastream diff --git a/core/proguard_basic_keeps.flags b/core/proguard_basic_keeps.flags index a0f577d8b..28ec2d043 100644 --- a/core/proguard_basic_keeps.flags +++ b/core/proguard_basic_keeps.flags @@ -72,3 +72,7 @@ # Less spammy. -dontnote + +# The lite proto runtime uses reflection to access fields based on the names in +# the schema, keep all the fields. +-keepclassmembers class * extends com.google.protobuf.MessageLite { ; } diff --git a/target/product/base_vendor.mk b/target/product/base_vendor.mk index 1e1effb53..f3705ea65 100644 --- a/target/product/base_vendor.mk +++ b/target/product/base_vendor.mk @@ -75,3 +75,7 @@ PRODUCT_PACKAGES += \ # VINTF data for vendor image PRODUCT_PACKAGES += \ device_compatibility_matrix.xml \ + +PRODUCT_PACKAGES += \ + libprotobuf-cpp-lite-vendorcompat \ + libprotobuf-cpp-full-vendorcompat \