Support multiple android products in a single bazel build

We create an android_product macro that replaces a lot
of the existing platform code. It takes a soong.variables
file, and creates bazel platforms for the android product,
various other arches, and the host platforms. (currently
host builds still depend on product config variables)

To change products, you'll be able to pass
--platform=//build/bazel/product_config/generated/products/<product_name>,
however currently we only generate the platforms for the
currently lunched product for performance. When the other
products are in starlark, we can allow using all of them.

Bug: 249685973
Test: Presubmits
Change-Id: Ic1b0942a60c66eb3fe2b1aa7a2ff436ec9b3c3fb
22 files changed
tree: 599664529d094ed631e28acce873abe6a7a5e185
  1. bin/
  2. ci/
  3. compliance/
  4. docs/
  5. examples/
  6. flags/
  7. json_module_graph/
  8. mk2rbc/
  9. mkcompare/
  10. platforms/
  11. product_config/
  12. product_variables/
  13. rules/
  14. scripts/
  15. tests/
  16. vendor/
  17. .gitignore
  18. bazel.BUILD
  19. bazel.WORKSPACE
  20. buildifier_hook.sh
  21. common.bazelrc
  22. darwin.bazelrc
  23. linux.bazelrc
  24. OWNERS
  25. PREUPLOAD.cfg
  26. README.md
README.md

Bazel

The code in this directory is experimental. Bazel support for Android Platform is undergoing active development and workflow stability is currently not guaranteed.