diff options
author | Ying Wang <wangying@google.com> | 2014-12-01 17:46:56 -0800 |
---|---|---|
committer | Bill Yi <byi@google.com> | 2014-12-02 18:17:55 +0000 |
commit | 8070b20f9ec899a5dc27c7589f11c6db8c72180a (patch) | |
tree | 7e64bf739c124ad9078fdab039120039069b6f69 /core/package_internal.mk | |
parent | 43fbdb2acb8e4e673d963630acbc32ab2717139c (diff) | |
download | build-8070b20f9ec899a5dc27c7589f11c6db8c72180a.zip build-8070b20f9ec899a5dc27c7589f11c6db8c72180a.tar.gz build-8070b20f9ec899a5dc27c7589f11c6db8c72180a.tar.bz2 |
Support to build dpi-specific apk variants.
In unbundled apps_only build, in addition to the base apk, you can also
build the dpi-specific apk variants, with:
LOCAL_DPI_VARIANTS := <a list of dpi names>
Previously user needs to include $(BUILD_PACKAGE) repeatedly with the
same package definition except dpi flags.
With this change, all the dpi-specific apk variants share the base apk's
compiled Java code and only diverge at the point we add resources/assets
to the apk.
Also we set up variables/targets/rules in a way those dpi-specific apks
appear to be independent apks to the users, for example, you can pass
"AppName_<dpi_name>" to tapas, and AppName_<dpi_name>.apk lives in its
own intermediate directory.
Bug: 18388705
Change-Id: I2ba4972ea7d1f796352fab2407888f996781ae44
Diffstat (limited to 'core/package_internal.mk')
-rw-r--r-- | core/package_internal.mk | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/package_internal.mk b/core/package_internal.mk index bb458d4..933b32f 100644 --- a/core/package_internal.mk +++ b/core/package_internal.mk @@ -407,6 +407,16 @@ endif $(align-package) ############################### +## Build dpi-specific apks, if it's apps_only build. +ifdef TARGET_BUILD_APPS +ifdef LOCAL_DPI_VARIANTS +$(foreach d, $(LOCAL_DPI_VARIANTS), \ + $(eval my_dpi := $(d)) \ + $(eval include $(BUILD_SYSTEM)/dpi_specific_apk.mk)) +endif +endif + +############################### ## Rule to build the odex file ifdef LOCAL_DEX_PREOPT $(built_odex): PRIVATE_DEX_FILE := $(built_dex) |