Use arg list file to pass arguments to jar.
To fix error "/bin/bash: Argument list too long"
Change-Id: Ie336b18f9a7eba38d94a6e32c07a88589ce9f1fd
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 25564b2..02b04d6 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -368,10 +368,11 @@
) \
)
# The arguments to jar that will include these files in a jar file.
+ # Quote the file name to handle special characters (such as #) correctly.
extra_jar_args := \
$(foreach group,$(java_resource_file_groups), \
- $(addprefix -C $(word 1,$(subst :,$(space),$(group))) , \
- $(wordlist 2,9999,$(subst :,$(space),$(group))) \
+ $(addprefix -C "$(word 1,$(subst :,$(space),$(group)))" , \
+ $(foreach w, $(wordlist 2,9999,$(subst :,$(space),$(group))), "$(w)" ) \
) \
)
java_resource_file_groups :=