Move populate_stubs into LEGACY BuildRelease

Previously, the populate_stubs was handled specially in produce_dist.
However, it is LEGACY behavior and so it makes sense to move the
code into the LEGACY BuildRelease's creator function.

While testing, the script failed because the LEGACY BuildRelease does
not build the snapshots, it assumes that the LEGACY is always run after
LATEST. This change makes the LEGACY build the snapshots. In normal use
it will not cause any increase in build time as it will always run
after LATEST and build the snapshots with the same environment turning
the build command into a no-op.

Bug: 218685706
Test: rm -fr out/soong/mainline-sdks
      packages/modules/common/build/mainline_modules_sdks.sh --build-release=LEGACY
      # Before this change it fails due to missing files, after it works.
      pyformat -s 4 --force_quote_type double -i build/mainline_modules_sdks*.py
      /usr/bin/pylint --rcfile $ANDROID_BUILD_TOP/tools/repohooks/tools/pylintrc build/mainline_modules_sdks*.py
Change-Id: Iaa2f9f71dd5085965d3ad32110b324453df87ee6
1 file changed
tree: 9aae104cd09f0de7ad3acc8541d78f332e0db1f8
  1. build/
  2. java/
  3. proguard/
  4. proto/
  5. sdk/
  6. tools/
  7. Android.bp
  8. generate_ml_bundle.sh
  9. MODULES_OWNERS
  10. OWNERS
  11. PREBUILTS_MODULE_OWNERS
  12. PREUPLOAD.cfg
  13. README.md
README.md

packages/modules/common

This project includes mainline build and other utility code. Any library code intended for use by modules should go in frameworks/libs/modules-utils instead.

java code

This project uses a single source path for java code. All java code should go in the java directory with subdirectories corresponding to the java package. Android.bp files should go alongside the java source files, and should only include java source for a single java package to encourage good code hygiene.

Tests for java code should go in the javatests directory and follow the same structure.