From 7ed9da0995be1dbc732f3d2d36c427cca8cdc0c2 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 24 Nov 2023 15:56:01 +0000 Subject: [PATCH] Hide flagged apis for all build releases except latest Passes `SOONG_SDK_SNAPSHOT_HIDE_FLAGGED_APIS` into the build to hide flagged APIs. Bug: 299570421 Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true vendor/google/build/mainline_modules_sdks.sh # Check that flagged APIs are excluded from everything but # for-latest-build. Change-Id: I67c018172dec46320b342a4d7bf89ca36e05a505 Merged-In: Ieb36f7b5e93d0f2b060dee244f2d66d2d20ba7c1 --- build/mainline_modules_sdks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/mainline_modules_sdks.py b/build/mainline_modules_sdks.py index ea2def9..8888220 100755 --- a/build/mainline_modules_sdks.py +++ b/build/mainline_modules_sdks.py @@ -732,6 +732,11 @@ class BuildRelease: # snapshot suitable for a specific target build release. "SOONG_SDK_SNAPSHOT_TARGET_BUILD_RELEASE": self.name, }) + # Unless flagged APIs are required to be included in the snapshot then + # tell the build to hide them. + if not self.include_flagged_apis: + self.soong_env["SOONG_SDK_SNAPSHOT_HIDE_FLAGGED_APIS"] = "true" + def __eq__(self, other): return self.ordinal == other.ordinal