diff options
| author | 2024-05-07 00:53:28 +0000 | |
|---|---|---|
| committer | 2024-06-12 21:06:36 +0000 | |
| commit | ce320f86a084cb29d5f4e24aee221e9e4dd4fb47 (patch) | |
| tree | c67f6f8f6f15ea08a42ab8669785de82e911a401 /scripts/merge_json.py | |
| parent | a551b011d0f25e5d41ec63922e69f8b86539920e (diff) | |
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
Diffstat (limited to 'scripts/merge_json.py')
0 files changed, 0 insertions, 0 deletions