Bp2Build converter for android_library_import and android_library.

Minor refactor of android_app converted to account for common attributes
between library and app.

Test: go test
Test: ../bazel/ci/bp2build.sh
Change-Id: I60b06eef6d2b9bc2d91f8b83522747ebbe76bbb6
Bug: 215230093
Bug: 215230095
This commit is contained in:
Romain Jobredeaux
2022-02-15 09:35:07 -05:00
parent edadcdb17c
commit c9b2bba3cd
6 changed files with 243 additions and 27 deletions

View File

@@ -2333,12 +2333,12 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
var deps bazel.LabelList
if m.properties.Libs != nil {
deps.Append(android.BazelLabelForModuleDeps(ctx, m.properties.Libs))
deps.Append(android.BazelLabelForModuleDeps(ctx, android.LastUniqueStrings(android.CopyOf(m.properties.Libs))))
}
var staticDeps bazel.LabelList
if m.properties.Static_libs != nil {
staticDeps.Append(android.BazelLabelForModuleDeps(ctx, m.properties.Static_libs))
staticDeps.Append(android.BazelLabelForModuleDeps(ctx, android.LastUniqueStrings(android.CopyOf(m.properties.Static_libs))))
}
protoDepLabel := bp2buildProto(ctx, &m.Module, srcPartitions[protoSrcPartition])