platform_build/tools/check-flagged-apis
Mårten Kongstad 9238a3ab76 check-flagged-apis: create list of @FlaggedApi errors
Teach check-flagged-apis to cross-check the data from its three input
sources. This allows the tool to detect

  - @FlaggedApi references to non-existent flags
  - @FlaggedApi APIs present in the build artifacts even though the flag
    is disabled
  - @FlaggedApi APIs not present in the build artifacts even though the
    flag is enabled

By passing in different sources, the tool can detect these errors for
any of the API surfaces (public, @SystemApi(MODULE_LIBRARIES), etc).

Note: the tool assumes that a disabled flag means that the @FlaggedApi
should not be present in the build output. This is currently true, but
won't be once metalava starts reverting @FlaggedApis to their previous
SDK snapshot.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: check-flagged-apis --api-signature out/target/product/mainline_x86/obj/ETC/frameworks-base-api-current.txt_intermediates/frameworks-base-api-current.txt --flag-values out/soong/.intermediates/all_aconfig_declarations.pb --api-versions out/dist/data/api-versions.xml
Change-Id: I790234865f831af7d45895def14d1d6740365622
2024-04-17 16:40:03 +02:00
..
src/com/android/checkflaggedapis check-flagged-apis: create list of @FlaggedApi errors 2024-04-17 16:40:03 +02:00
Android.bp check-flagged-apis: parse flag names and values 2024-04-17 15:27:48 +02:00
OWNERS check-flagged-apis: add new CLI to verify @FlaggedApi APIs 2024-04-16 10:32:17 +02:00