tree: cb8208f26c3eb9fea6be9f48e6bb6ea260d1a46d
  1. dist/
  2. prebuilts/
  3. apex.bzl
  4. apex_key.bzl
  5. apex_settings.bzl
  6. BUILD.bazel
  7. cc_constants.bzl
  8. cc_library_headers.bzl
  9. cc_library_static.bzl
  10. cc_object.bzl
  11. filegroup.bzl
  12. full_cc_library.bzl
  13. generate_toc.bzl
  14. lunch.bzl
  15. prebuilt_library_static.bzl
  16. README.md
  17. soong_injection.bzl
  18. static_libc.bzl
  19. stripped_shared_library.bzl
rules/README.md

Bazel rules for Android Platform.

This directory contains Starlark extensions for building the Android Platform with Bazel.

APEX

Run the following commands to build a miminal APEX example.

  1. Build host tools with Soong as a workaround.
$ m aapt2 apexer apex_compression_tool aprotoc avbtool conv_apex_manifest deapexer dep_fixer e2fsdroid extract_apks jsonmodify make_f2fs merge_zips mke2fs resize2fs sbox sefcontext_compile sload_f2fs soong_javac_wrapper soong_zip symbol_inject zipalign zipsync
  1. Run Bazel with APEXER_TOOL_PATH pointing to the two directories containing apexer host tool prebuilts, and also the --//build/bazel/rules:enable_apex=True development feature flag.
$ b build //build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal --//build/bazel/rules:enable_apex=True --action_env=APEXER_TOOL_PATH=$HOME/aosp/master/out/soong/host/linux-x86/bin:$HOME/aosp/master/prebuilts/sdk/tools/linux/bin
  1. Verify the contents of the APEX
$ zipinfo bazel-bin/build/bazel/examples/apex/minimal/build.bazel.examples.apex.minimal.apex