Introduce script and module to pass aconfig flags to metalava
`keep-flagged-apis` module generates a txt file that
contains annotations based on aconfig flags that are passed to metalava
when generating "exportable" or "runtime" stubs.
`keep-flagged-apis.sh` already exists under
`packages/modules/SdkExtensions` directory, but modifying the script
(and the bp module definition) will break the `udc-mainline-prod` branch
in downstream. Therefore, the modified script and the module definition
is defined here, and will be used in the long term.
Test: m keep-flagged-apis && manual
Bug: 315485740
Change-Id: I4ab8d4ea2c6c8ddba6d55b2b25e8c8d3b7c8fa07
diff --git a/scripts/Android.bp b/scripts/Android.bp
index 97f6ab4..7baaadb 100644
--- a/scripts/Android.bp
+++ b/scripts/Android.bp
@@ -254,3 +254,8 @@
"modify_permissions_allowlist.py",
],
}
+
+sh_binary_host {
+ name: "keep-flagged-apis",
+ src: "keep-flagged-apis.sh",
+}