This directory contains jq scripts that query Soong‘s module graph. jq may be installed through your distribution’s repository.
Usage:
m json-module-graph query.sh [-C] <command> <base-of-your-tree>/out/soong/module-graph.json [argument]
The following commands are available:
directDeps prints the names of the direct dependencies of the given moduledistanceFromLeaves prints the longest distance each module has from a leaf in the module graph within the transitive closure of given modulefilterSubtree dumps only those modules that are in the given subtree of the source treefullTransitiveDeps returns the full transitive dependencies of the given modulemoduleTypeStats: returns of a summary of the module types present on the inputmodulesOfType: returns the names of modules of the input typeprintModule prints all variations of a given moduleprintModule: returns a slightly more consise view of the input moduleproperties: returns the properties set in the input module, includes properties set via defaultstransitiveDeps prints the names of the transitive dependencies of the given moduleusedVariations returns a map that shows which variations are used in the input and what values they takevariantTransitions summarizes the variant transitions in the transitive closure of the given modulefullTransitiveDepsProperties returns the properties set (including via defaults) grouped by module type of the modules in the transitive closure of the given moduleIt‘s best to filter the full module graph to the part you are interested in because jq isn’t too fast on the full graph.