Allow proto builds to pass in java proto params.
Change-Id: I65fe0cd96f818f59267da6159e6bd2ad28f07a11
diff --git a/core/base_rules.mk b/core/base_rules.mk
index f0a6398..f6497da 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -264,6 +264,7 @@
endif
endif
$(proto_java_sources_file_stamp): PRIVATE_PROTOC_FLAGS := $(LOCAL_PROTOC_FLAGS)
+$(proto_java_sources_file_stamp): PRIVATE_PROTO_JAVA_OUTPUT_PARAMS := $(LOCAL_PROTO_JAVA_OUTPUT_PARAMS)
$(proto_java_sources_file_stamp) : $(proto_sources_fullpath) $(PROTOC)
$(call transform-proto-to-java)
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 8d84814..7ad58b2 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -120,6 +120,7 @@
LOCAL_DEX_PREOPT:= # '',true,false,nostripping
LOCAL_PROTOC_OPTIMIZE_TYPE:= # lite(default),micro,nano,full
LOCAL_PROTOC_FLAGS:=
+LOCAL_PROTO_JAVA_OUTPUT_PARAMS:=
LOCAL_NO_CRT:=
LOCAL_PROPRIETARY_MODULE:=
LOCAL_MODULE_OWNER:=
diff --git a/core/definitions.mk b/core/definitions.mk
index 7834baa..012dc44 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -892,7 +892,7 @@
$(hide) for f in $(PRIVATE_PROTO_SRC_FILES); do \
$(PROTOC) \
$(addprefix --proto_path=, $(PRIVATE_PROTO_INCLUDES)) \
- $(PRIVATE_PROTO_JAVA_OUTPUT_OPTION)=$(PRIVATE_PROTO_JAVA_OUTPUT_DIR) \
+ $(PRIVATE_PROTO_JAVA_OUTPUT_OPTION)="$(PRIVATE_PROTO_JAVA_OUTPUT_PARAMS):$(PRIVATE_PROTO_JAVA_OUTPUT_DIR)" \
$(PRIVATE_PROTOC_FLAGS) \
$$f || exit 33; \
done