aboutsummaryrefslogtreecommitdiff
path: root/envsetup.sh
diff options
context:
space:
mode:
authorZhi Dou <zhidou@google.com>2023-10-11 19:49:56 +0000
committerZhi Dou <zhidou@google.com>2023-10-20 21:04:00 +0000
commit77c9f0c9cb784fa6e4c1a254a0f83eeb5694cd61 (patch)
tree76f73e98d28ada16797fe16c8dbffa36b4900467 /envsetup.sh
parentd1aa0735ee1b5857ce5fe9054bb798f6441e8295 (diff)
downloadbuild-77c9f0c9cb784fa6e4c1a254a0f83eeb5694cd61.tar.gz
add script to help override flag value locally
Add a script to help to create flag value building rules. The script will only extract necessary information from the value file but it will not validate the file. The validation will defer to building system. For input ``` flag_value { package: "com.android.aconfig.test" name: "disabled_ro" state: DISABLED permission: READ_ONLY } flag_value { package: "com.android.demoapp.test" name: "enabled_ro" state: DISABLED permission: READ_WRITE } flag_value { package: "com.android.aconfig.test" name: "enabled_rw" state: ENABLED permission: READ_WRITE } ``` The output Android.bp file will be like ``` VALUE_LIST_LIST = [ aconfig-local-com.android.demoapp.test, aconfig-local-com.android.aconfig.test ] aconfig_values { name: "aconfig-local-com.android.demoapp.test", package: "com.android.demoapp.test", srcs: [ "override_values.textproto", ] } aconfig_values { name: "aconfig-local-com.android.aconfig.test", package: "com.android.aconfig.test", srcs: [ "override_values.textproto", ] } ``` Bug: 298692416 Test: source build/envsetup.sh && overrideflags, and then check the output Change-Id: Ife4063e079811e0b29046be7a6bc127cad668ed0
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/envsetup.sh b/envsetup.sh
index 9d27c9d178..af6695fb94 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -2054,6 +2054,11 @@ function avbtool() {
"$ANDROID_SOONG_HOST_OUT"/bin/avbtool $@
}
+function overrideflags() {
+ local T="$(gettop)"
+ (\cd "${T}" && build/make/tools/overrideflags.sh "$@")
+}
+
validate_current_shell
set_global_paths
source_vendorsetup