Dedup *fragments information common to apex and sdk

Previously, both the sdk and apex had to specify the same *fragments
property to ensure that building a system image from a prebuilt
version of the module (both APEX and sdk snapshots) would work.

This change avoids the duplication by adding the apex to the sdk which
allows the sdk to automatically export any APIs and related information
provided by the APEX. At the moment that just includes information from
*fragments properties but may expand in future.

This also removes legacy.i18n.module.platform.api and
i18n.module.public.api from the java_sdk_libs property of the sdk as
those modules are listed in the APIs of
com.android.i18n-bootclasspath-fragment and so are automatically added
to the sdk when the fragment is added.

The i18n.module.intra.core.api and stable.i18n.module.platform.api
modules have not been removed as they are not listed in the APIs of the
fragment.

Bug: 232401814
Test: # Build snapshots with a fixed build number
      BUILD_NUMBER=fixed packages/modules/common/build/mainline_modules_sdks.sh
      # Remove api diff files as they contain file stamps of generated files so
      # differ every time they are generated.
      find out/dist/mainline-sdks -name \*txt | xargs rm
      # Save the snapshots away.
      mv out/dist/mainline-sdks before-changes
      # Apply this change.
      # Repeat the first two steps above and then run the following to verify
      # that this change had no effect on the generated snapshot contents.
      meld before-changes out/dist/mainline-sdks
Change-Id: I5937bfc73a35623f148816522cece5969fecbbe3
(cherry picked from commit 891b8365b0f8d0497f17bdeab05b3f409b8f684f)
Merged-In: I5937bfc73a35623f148816522cece5969fecbbe3
1 file changed
tree: b60e5688b9643e52b679722d86de05c4f7a63bfd
  1. apex/
  2. OWNERS
  3. PREUPLOAD.cfg