platform_build_soong/scripts/hiddenapi
Paul Duffin 1e18e98b14 Allow implementation details to be excluded from signature patterns file
Previously, the signature-patterns.csv file (which was output in an sdk
snapshot) included implementation details, e.g. the names of classes
that are not part of any API, including the hidden API. This change
allows a bootclasspath_fragment module owner to customize the generated
signature patterns file to remove as many implementation details as
possible from the sdk snapshot. That means that implementation only
changes would not require that sdk snapshots be updated in sync with
the corresponding APEX.

Module owners can remove implementation in the following ways:
1) Limit the number of packages that are treated as split packages by
   explicitly specifying the split packages in the split_packages
   property. A split package is one whose classes are provided by
   separate bootclasspath_fragment modules and so the signature
   patterns has to include every class in that package provided by a
   specific bootclasspath_fragment module, including implementation
   classes, instead of just listing the package.

   The default is to treat all packages as being split, so if no
   split_packages is specified then it defaults to ["*"] which matches
   all packages. Assuming that no package was split unless specifically
   stated would require that all the modules that had split packages
   explicitly list them before this change could be submitted as
   without them this change would break the build.

   Once all existing modules with split packages have been updated to
   include them then the default may be changed.

2) Adding package prefixes for any hierarchy of packages that are
   owned solely by that bootclasspath_fragment. This removes the need
   to list the packages in that hierarchy, including implementation
   specific packages.

Bug: 194063708
Test: atest --host verify_overlaps_test signature_patterns_test
      m out/soong/hiddenapi/hiddenapi-flags.csv
      - manually change files to cause difference in flags to check
        that it detects the differences.
Change-Id: If2f90cfc41b6fff9fa4ac8b9d4973110938b9392
2021-10-05 15:47:05 +01:00
..
Android.bp Separate creation of signature patterns from overlap checking 2021-08-06 13:40:34 +01:00
generate_hiddenapi_lists.py Apply pylint to scripts/hiddenapi/generate_hiddenapi_lists* 2021-08-27 00:09:25 +00:00
generate_hiddenapi_lists_test.py Apply pylint to scripts/hiddenapi/generate_hiddenapi_lists* 2021-08-27 00:09:25 +00:00
merge_csv.py Apply pylint to remaining scripts in hiddenapi 2021-08-27 00:30:41 +00:00
signature_patterns.py Allow implementation details to be excluded from signature patterns file 2021-10-05 15:47:05 +01:00
signature_patterns_test.py Allow implementation details to be excluded from signature patterns file 2021-10-05 15:47:05 +01:00
verify_overlaps.py Apply pylint to scripts/hiddenapi/verify_overlaps* 2021-08-31 18:24:24 +00:00
verify_overlaps_test.py Apply pylint to scripts/hiddenapi/verify_overlaps* 2021-08-31 18:24:24 +00:00