1# Examples of Bazel queries in the QueryView 2 3**Warning**: This feature is undergoing active development and the generated 4Bazel BUILD files and other user-facing APIs will change without warning. We 5recommend to use this feature for learning, exploration, information gathering 6and debugging purposes only. 7 8## Usage 9 10Setup your AOSP product config and create the queryview directory: 11 12``` 13source build/envsetup.sh 14lunch aosp_arm # or your preferred target 15m queryview 16``` 17 18Then, run `bazel query` with the `queryview` config, and `--query_file` pointing 19to the file containing the query expression to run for the current product 20configuration: 21 22``` 23bazel query --config=queryview --query_file=build/bazel/examples/queries/android_app.txt 24``` 25 26Alternatively, you can also write the expression directly in the command: 27 28``` 29bazel query --config=queryview 'kind("android_app rule", //...)' 30``` 31 32## Examples 33 34* `android_apps`: lists all `android_app` modules for the current product configuration 35* `nocrt`: modules with `nocrt: True` 36* `apex_available`: modules with `//apex_available:platform` in the `apex_available` list property 37* `libc_variant`: all variants for `libc` 38