Warning: This feature is undergoing active development and the generated Bazel BUILD files and other user-facing APIs will change without warning. We recommend to use this feature for learning, exploration, information gathering and debugging purposes only.
Setup your AOSP product config and create the queryview directory:
source build/envsetup.sh lunch aosp_arm # or your preferred target m queryview
Then, run bazel query with the queryview config, and --query_file pointing to the file containing the query expression to run for the current product configuration:
bazel query --config=queryview --query_file=build/bazel/examples/queries/android_app.txt
Alternatively, you can also write the expression directly in the command:
bazel query --config=queryview 'kind("android_app rule", //...)'
android_apps: lists all android_app modules for the current product configurationnocrt: modules with nocrt: Trueapex_available: modules with //apex_available:platform in the apex_available list propertylibc_variant: all variants for libc