android-bp
A python module to parse Android.bp files (wrapper for android_bp rust module)
Goals
This module will quickly parse Android.bp files and provide a python interface to access the data.
Non-Goals
This module is only intended to parse Android.bp files, not to generate or rewrite them.
Usage
from android_bp import Blueprint
bp = Blueprint.from_file("Android.bp")
print(bp)
print(bp.variables)
for m in bp.modules:
if m.__type__ == "rust_binary":
print(m.name)
for m in bp.modules_by_type("rust_host_test"):
print(m.__dict__["name"])
print(m.unknown_attribute)
print(m.test_options['unit_test'])