Add support for building SDKs for bundled modules and platform SDKs for
Mainline.

These are used in the ART thin manifest. They are added here to allow
using the common module build scripts for them as well.

The Python script is extended to work for these modules, and their SDKs
end up in DIST_DIR/bundled-mainline-sdks, so DIST_DIR/mainline-sdks
only carries the SDKs for unbundled modules that are to be distributed
to partners etc.

This change has the effect to (re)enable building these SDKs in CI.

Test: env TARGET_BUILD_APPS="com.android.i18n com.android.runtime com.android.tzdata" \
        packages/modules/common/build/mainline_modules_sdks.sh \
        --build-platform-sdks-for-mainline --build-release=latest
  Replace SDK snapshots under prebuilts/runtime/mainline with
  those produced in out/dist/bundled-mainline-sdks
  in a master-art tree, with https://r.android.com/2046463 applied,
  then `banchan com.android.art && m`
Test: env -u TARGET_BUILD_APPS \
        packages/modules/common/build/mainline_modules_sdks.sh \
        --build-release=latest
  Check that all SDKs are built, and that the bundled SDKs get copied
  to out/dist/bundled-mainline-sdks so the contents of
  out/dist/mainline-sdks and out/dist/stubs remain unchanged.
Test: env -u TARGET_BUILD_APPS \
        packages/modules/common/build/mainline_modules_sdks.sh \
        --build-release=S
  Check that out/dist/bundled-mainline-sdks isn't producted.
Test: env -u TARGET_BUILD_APPS \
        vendor/google/build/mainline_modules_sdks.sh
  Check that all SDKs are built, and that the bundled SDKs get copied
  to out/dist/bundled-mainline-sdks so the contents of
  out/dist/mainline-sdks and out/dist/stubs remain unchanged.
Test: atest --host mainline_modules_sdks_test
Bug: 216762037
Change-Id: Ie6182fa42dc9c2c7f35ed95a040c05be0f0e878a
2 files changed
tree: 8ecc7280222154b096a968dc154bcf4730c22817
  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.