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
This commit is contained in:
Paul Duffin
2023-11-24 15:56:01 +00:00
parent 15cc714e9a
commit 7ed9da0995

View File

@@ -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