Generate file for module to project mapping.

Currently there exist no mapping between the module name to its git
project directory (for prebuilts/module_sdk).

This CL adds a .json file to android build artifacts, which can be
fetched to obtain this mapping.

The .json file contents for 2 modules looks like -
{
    "com.google.android.adservices": {
        "module_sdk_project": "prebuilts/module_sdk/AdServices"
    },
    "com.google.android.appsearch": {
        "module_sdk_project": "prebuilts/module_sdk/AppSearch"
    },
}

This can be extended to add any more information about a module.

Bug: 321970705
Test: packages/modules/common/build/mainline_modules_sdks.sh --build-release=latest
Test: The file generates successfully at dist root.
Test: atest mainline_modules_sdks_test
Change-Id: I2fde908612b890057ce79ef1eb2668168ca070df
2 files changed
tree: 29f86fcc1a064e10b4d42c160d5d563e8805c3cd
  1. build/
  2. java/
  3. javatests/
  4. proguard/
  5. proto/
  6. sdk/
  7. tools/
  8. Android.bp
  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.