Support variants.
This is complicated because of the combination of variants and packages.
Some configuration options (e.g. "patch") apply to a particular package
for all variants, some (e.g. "add_module_block") apply to a particular
variant of a particular package, and some (e.g. "features") apply to a
particular variant for all packages. For now there are no options that
apply across all variants of all packages, but there could be in future.
I've split these options up into separate config structs accordingly.
For now, this is a breaking change to the cargo_embargo.json
configuration format, but the following changes fix this by expanding
variant configuration with defaults from the higher level.
Bug: 293289578
Test: atest cargo_embargo.test
Change-Id: I1e555a7ab9b9bf5c10d6c1c9b5a8d2c3479cd31c
16 files changed