Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ce320f86 authored by Jihoon Kang's avatar Jihoon Kang
Browse files

Pass --non-updatable-system flag to aapt2 when versionCode is unspecified

This change modifies the flags passed to aapt2 when generating the APKs.
Currently, the version code of the platform sdk version is passed to
aapt2 when the bp module definition does not explicitly specify the
`--version-code` flag in "aaptflags" parameter. This change modifies
such behavior so that the newly introduced `--non-updatable-system` flag
is passed instead of implicitly passing the `--version-code`.

If "versionCode" is explicitly specified in the app manifest, the
`--non-updatable-system` flag is overriden and is a no-op. This way, the
build continues to stay agnostic to the content of the manifest files.

This flag is not passed for build actions of android_test modules, as
test targets do not set `versionCode`.

Test: m nothing --no-skip-soong-tests &&  manually inspect aapt2 build rules
Bug: 311724570
Change-Id: Ie3e50506d90da1d28b8039e29d76859b1927b5e2
parent a551b011
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment