Create a new product variable to gate blueprint files

Users can use this feature by
1. Setting PRODUCT_INCLUDE_TAGS += <val> in their product mk files
2. Set
```
blueprint_packge_includes {
  match_al: ["<val>"],
}

other_module_type {name: foo}
other_module_type {name: bar}
```

bar and foo will be included if and only if <val> is set

Test: Unit tests in blueprint
Test: TH

Change-Id: I32eed4e3b5ac47fb565c62d13d8881fa984c86f4
This commit is contained in:
Spandan Das
2022-11-08 18:42:16 +00:00
parent c03724c442
commit c576383336
7 changed files with 21 additions and 0 deletions

View File

@@ -114,6 +114,7 @@ func newContext(configuration android.Config) *android.Context {
ctx := android.NewContext(configuration)
ctx.SetNameInterface(newNameResolver(configuration))
ctx.SetAllowMissingDependencies(configuration.AllowMissingDependencies())
ctx.AddIncludeTags(configuration.IncludeTags()...)
return ctx
}