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
diff --git a/java/java.go b/java/java.go
index f4ec04e..481c625 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2333,12 +2333,12 @@
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])