Merge "Do not run zipalign when building APK (except prebuilts)." am: b437f58006
am: fddfc2c604
am: 60d6e2eb00
* commit '60d6e2eb002b12c28c0f28527c020837adea9164':
Do not run zipalign when building APK (except prebuilts).
This commit is contained in:
commit
f29904e889
|
@ -48,7 +48,7 @@ endif # full_classes_jar
|
||||||
$(built_dpi_apk) : $(R_file_stamp)
|
$(built_dpi_apk) : $(R_file_stamp)
|
||||||
$(built_dpi_apk) : $(all_library_res_package_export_deps)
|
$(built_dpi_apk) : $(all_library_res_package_export_deps)
|
||||||
$(built_dpi_apk) : $(private_key) $(certificate) $(SIGNAPK_JAR)
|
$(built_dpi_apk) : $(private_key) $(certificate) $(SIGNAPK_JAR)
|
||||||
$(built_dpi_apk) : $(AAPT) | $(ZIPALIGN)
|
$(built_dpi_apk) : $(AAPT)
|
||||||
$(built_dpi_apk) : $(all_res_assets) $(jni_shared_libraries) $(full_android_manifest)
|
$(built_dpi_apk) : $(all_res_assets) $(jni_shared_libraries) $(full_android_manifest)
|
||||||
@echo "target Package: $(PRIVATE_MODULE) ($@)"
|
@echo "target Package: $(PRIVATE_MODULE) ($@)"
|
||||||
$(if $(PRIVATE_SOURCE_ARCHIVE),\
|
$(if $(PRIVATE_SOURCE_ARCHIVE),\
|
||||||
|
@ -68,7 +68,6 @@ ifdef LOCAL_JACK_ENABLED
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
$(sign-package)
|
$(sign-package)
|
||||||
$(align-package)
|
|
||||||
|
|
||||||
# Set up global variables to register this apk to the higher-level dependency graph.
|
# Set up global variables to register this apk to the higher-level dependency graph.
|
||||||
ALL_MODULES += $(dpi_apk_name)
|
ALL_MODULES += $(dpi_apk_name)
|
||||||
|
|
|
@ -436,7 +436,7 @@ $(LOCAL_BUILT_MODULE): PRIVATE_ADDITIONAL_CERTIFICATES := $(foreach c,\
|
||||||
$(LOCAL_ADDITIONAL_CERTIFICATES), $(c).x509.pem $(c).pk8)
|
$(LOCAL_ADDITIONAL_CERTIFICATES), $(c).x509.pem $(c).pk8)
|
||||||
|
|
||||||
# Define the rule to build the actual package.
|
# Define the rule to build the actual package.
|
||||||
$(LOCAL_BUILT_MODULE): $(AAPT) | $(ZIPALIGN)
|
$(LOCAL_BUILT_MODULE): $(AAPT)
|
||||||
# PRIVATE_JNI_SHARED_LIBRARIES is a list of <abi>:<path_of_built_lib>.
|
# PRIVATE_JNI_SHARED_LIBRARIES is a list of <abi>:<path_of_built_lib>.
|
||||||
$(LOCAL_BUILT_MODULE): PRIVATE_JNI_SHARED_LIBRARIES := $(jni_shared_libraries_with_abis)
|
$(LOCAL_BUILT_MODULE): PRIVATE_JNI_SHARED_LIBRARIES := $(jni_shared_libraries_with_abis)
|
||||||
# PRIVATE_JNI_SHARED_LIBRARIES_ABI is a list of ABI names.
|
# PRIVATE_JNI_SHARED_LIBRARIES_ABI is a list of ABI names.
|
||||||
|
@ -485,8 +485,6 @@ ifneq (nostripping,$(LOCAL_DEX_PREOPT))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
$(sign-package)
|
$(sign-package)
|
||||||
@# Alignment must happen after all other zip operations.
|
|
||||||
$(align-package)
|
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
## Build dpi-specific apks, if it's apps_only build.
|
## Build dpi-specific apks, if it's apps_only build.
|
||||||
|
@ -521,7 +519,7 @@ built_apk_splits := $(foreach s,$(my_split_suffixes),$(built_module_path)/packag
|
||||||
installed_apk_splits := $(foreach s,$(my_split_suffixes),$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
|
installed_apk_splits := $(foreach s,$(my_split_suffixes),$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
|
||||||
|
|
||||||
# The splits should have been built in the same command building the base apk.
|
# The splits should have been built in the same command building the base apk.
|
||||||
# This rule just runs signing and zipalign etc.
|
# This rule just runs signing.
|
||||||
# Note that we explicily check the existence of the split apk and remove the
|
# Note that we explicily check the existence of the split apk and remove the
|
||||||
# built base apk if the split apk isn't there.
|
# built base apk if the split apk isn't there.
|
||||||
# That way the build system will rerun the aapt after the user changes the splitting parameters.
|
# That way the build system will rerun the aapt after the user changes the splitting parameters.
|
||||||
|
@ -533,7 +531,6 @@ $(built_apk_splits) : $(built_module_path)/%.apk : $(LOCAL_BUILT_MODULE)
|
||||||
rm $<; exit 1; \
|
rm $<; exit 1; \
|
||||||
fi
|
fi
|
||||||
$(sign-package)
|
$(sign-package)
|
||||||
$(align-package)
|
|
||||||
|
|
||||||
# Rules to install the splits
|
# Rules to install the splits
|
||||||
$(installed_apk_splits) : $(my_module_path)/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk | $(ACP)
|
$(installed_apk_splits) : $(my_module_path)/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk | $(ACP)
|
||||||
|
|
|
@ -224,8 +224,10 @@ ifneq (nostripping,$(LOCAL_DEX_PREOPT))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
$(sign-package)
|
$(sign-package)
|
||||||
endif
|
# No need for align-package because sign-package takes care of alignment
|
||||||
|
else
|
||||||
$(align-package)
|
$(align-package)
|
||||||
|
endif
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
## Rule to build the odex file
|
## Rule to build the odex file
|
||||||
|
@ -241,7 +243,7 @@ ifdef LOCAL_PACKAGE_SPLITS
|
||||||
built_apk_splits := $(addprefix $(built_module_path)/,$(notdir $(LOCAL_PACKAGE_SPLITS)))
|
built_apk_splits := $(addprefix $(built_module_path)/,$(notdir $(LOCAL_PACKAGE_SPLITS)))
|
||||||
installed_apk_splits := $(addprefix $(my_module_path)/,$(notdir $(LOCAL_PACKAGE_SPLITS)))
|
installed_apk_splits := $(addprefix $(my_module_path)/,$(notdir $(LOCAL_PACKAGE_SPLITS)))
|
||||||
|
|
||||||
# Rules to sign and zipalign the split apks.
|
# Rules to sign the split apks.
|
||||||
my_src_dir := $(sort $(dir $(LOCAL_PACKAGE_SPLITS)))
|
my_src_dir := $(sort $(dir $(LOCAL_PACKAGE_SPLITS)))
|
||||||
ifneq (1,$(words $(my_src_dir)))
|
ifneq (1,$(words $(my_src_dir)))
|
||||||
$(error You must put all the split source apks in the same folder: $(LOCAL_PACKAGE_SPLITS))
|
$(error You must put all the split source apks in the same folder: $(LOCAL_PACKAGE_SPLITS))
|
||||||
|
@ -253,7 +255,6 @@ $(built_apk_splits) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
|
||||||
$(built_apk_splits) : $(built_module_path)/%.apk : $(my_src_dir)/%.apk | $(ACP)
|
$(built_apk_splits) : $(built_module_path)/%.apk : $(my_src_dir)/%.apk | $(ACP)
|
||||||
$(copy-file-to-new-target)
|
$(copy-file-to-new-target)
|
||||||
$(sign-package)
|
$(sign-package)
|
||||||
$(align-package)
|
|
||||||
|
|
||||||
# Rules to install the split apks.
|
# Rules to install the split apks.
|
||||||
$(installed_apk_splits) : $(my_module_path)/%.apk : $(built_module_path)/%.apk | $(ACP)
|
$(installed_apk_splits) : $(my_module_path)/%.apk : $(built_module_path)/%.apk | $(ACP)
|
||||||
|
|
Loading…
Reference in New Issue