diff options
author | Jiyong Park <jiyong@google.com> | 2019-01-05 12:57:48 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2019-01-09 21:12:27 +0900 |
commit | 7f67f48cbbd7a0c6079acb2d811ac85c47aaf356 (patch) | |
tree | 60735919890713a6ed8f3575d160add161dc839c /apex | |
parent | e6092a5e489edc349eec71292219453d3d06d9ea (diff) | |
download | build_soong-7f67f48cbbd7a0c6079acb2d811ac85c47aaf356.tar.gz build_soong-7f67f48cbbd7a0c6079acb2d811ac85c47aaf356.tar.bz2 build_soong-7f67f48cbbd7a0c6079acb2d811ac85c47aaf356.zip |
Add PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES
It is a list of <module_name>:<manifest_name> pairs. When the module
name of an APK or an APEX matches with <module_name>, then its app
manifest name is overridden to <manifest_name>.
<module_name> and <manifest_name> can be patterns as in
com.android.%:com.mycompany.android.%.release
Note that, in case of APEXes, the manifest name refers to the name of
the zip container. The apex manifest name (which is specified in
apex_manifest.json) is not overridden.
Test: m with PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES for
1) an APK in Android.mk
2) an APK in ANdroid.bp
3) an APEX
and check that manifest names are modified as specified
Change-Id: Ie58882d90884695e893944c43d9c8803b283e93d
Diffstat (limited to 'apex')
-rw-r--r-- | apex/apex.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apex/apex.go b/apex/apex.go index c6d2e8e7..1d50cee3 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -757,6 +757,11 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext, keyFile and optFlags = append(optFlags, "--pubkey "+pubKeyFile.String()) } + manifestPackageName, overridden := ctx.DeviceConfig().OverrideManifestPackageNameFor(ctx.ModuleName()) + if overridden { + optFlags = append(optFlags, "--override_apk_package_name "+manifestPackageName) + } + ctx.Build(pctx, android.BuildParams{ Rule: apexRule, Implicits: implicitInputs, |