Bug 1355625 - Part 4: TO BE FOLDED - Use the Python aapt invocation. r=mshal draft
authorNick Alexander <nalexander@mozilla.com>
Mon, 08 May 2017 16:14:53 -0700
changeset 575029 82670648e85b66ac5572d9377bec3cc2ad403adb
parent 575028 d1b9b3e268bbf302baaad6d5bf2fcd8b6994513f
child 575030 c6c30e32dd9dcbf7c53c74158e3ea39e57ffa390
push id57895
push usernalexander@mozilla.com
push dateTue, 09 May 2017 18:15:01 +0000
reviewersmshal
bugs1355625
milestone55.0a1
Bug 1355625 - Part 4: TO BE FOLDED - Use the Python aapt invocation. r=mshal This will be folded into the first patch. MozReview-Commit-ID: 2adwv7O4mSa
mobile/android/base/Makefile.in
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -420,42 +420,25 @@ ANDROID_AAPT_IGNORE := !.svn:!.git:.*:<d
 # We touch the target file before invoking aapt so that aapt's outputs
 # are fresher than the target, preventing a subsequent invocation from
 # thinking aapt's outputs are stale.  This is safe because Make
 # removes the target file if any recipe command fails.
 
 define aapt_command
 $(1): $$(call mkdir_deps,$(filter-out ./,$(dir $(3) $(4) $(5)))) $(2)
 	@$$(TOUCH) $$@
-	$$(AAPT) package -f -m \
-		-M AndroidManifest.xml \
-		-I $(ANDROID_SDK)/android.jar \
-		$(if $(MOZ_ANDROID_MAX_SDK_VERSION),--max-res-version $(MOZ_ANDROID_MAX_SDK_VERSION),) \
-		--auto-add-overlay \
-		$$(addprefix -S ,$$(ANDROID_RES_DIRS)) \
-		$$(addprefix -A ,$$(ANDROID_ASSETS_DIRS)) \
-		$(if $(ANDROID_EXTRA_PACKAGES),--extra-packages $$(subst $$(NULL) ,:,$$(strip $$(ANDROID_EXTRA_PACKAGES)))) \
-		$(if $(ANDROID_EXTRA_RES_DIRS),$$(addprefix -S ,$$(ANDROID_EXTRA_RES_DIRS))) \
-		--custom-package org.mozilla.gecko \
-		--no-version-vectors \
-		-F $(3) \
-		-J $(4) \
-		--output-text-symbols $(5) \
-		--ignore-assets "$$(ANDROID_AAPT_IGNORE)"
-	mkdir -p $(subst /,-2/,$(4))
-	mkdir -p aapt
 	$$(call py_action,aapt_package,-f -m \
 		-M AndroidManifest.xml \
 		$$(addprefix -A ,$$(ANDROID_ASSETS_DIRS)) \
 		$$(addprefix -S ,$$(ANDROID_RES_DIRS)) \
 		$(if $(ANDROID_EXTRA_RES_DIRS),$$(addprefix -S ,$$(ANDROID_EXTRA_RES_DIRS))) \
 		$(if $(ANDROID_EXTRA_PACKAGES),--extra-packages $$(subst $$(NULL) ,:,$$(strip $$(ANDROID_EXTRA_PACKAGES)))) \
-		-F $(subst .ap_,-2.ap_,$(3)) \
-		-J $(subst /,-2/,$(4)) \
-		--output-text-symbols aapt/ \
+		-F $(3) \
+		-J $(4) \
+		--output-text-symbols $(5) \
 	  --verbose)
 endef
 
 # [Comment 3/3] The first of these rules is used during regular
 # builds.  The second writes an ap_ file that is only used during
 # packaging.  It doesn't write the normal ap_, or R.java, since we
 # don't want the packaging step to write anything that would make a
 # further no-op build do work.  See also