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
Loading
Please register or sign in to comment