Ignore test apexes from bp2build generated tags
Soong does not enforce apex_available on the contents of test apex. To prevent special-casing test apexes in the apex validation aspect in Bazel, drop the test apexes from the tags altogether. ( The core problem I am trying to solve is making sure that stub libraries in Bazel have a single apex available. apex validation happens to be a nice side benefit) Bug: 277651159 Test: go test ./bp2build Change-Id: Ibb3cfedb5c0f2cda0464bf3758c70b67cb5885d1
This commit is contained in:
@@ -207,7 +207,7 @@ func bp2buildProto(ctx android.Bp2buildMutatorContext, m *Module, protoSrcs baze
|
||||
protoAttrs.Min_sdk_version = m.Properties.Min_sdk_version
|
||||
|
||||
name := m.Name() + suffix
|
||||
tags := android.ApexAvailableTags(m)
|
||||
tags := android.ApexAvailableTagsWithoutTestApexes(ctx.(android.TopDownMutatorContext), m)
|
||||
ctx.CreateBazelTargetModule(
|
||||
bazel.BazelTargetModuleProperties{
|
||||
Rule_class: rule_class,
|
||||
|
Reference in New Issue
Block a user