Add support for prebuilts attribute to the bp2build APEX converter.
Test: Updated unit test.
Change-Id: I73dfa84d7a55c0b94393ad6257b5f16313422852
diff --git a/apex/apex.go b/apex/apex.go
index 0857946..149f782 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -3197,6 +3197,7 @@
Installable bazel.BoolAttribute
Native_shared_libs bazel.LabelListAttribute
Binaries bazel.StringListAttribute
+ Prebuilts bazel.LabelListAttribute
}
type bazelApexBundle struct {
@@ -3262,6 +3263,10 @@
nativeSharedLibsLabelList := android.BazelLabelForModuleDeps(ctx, nativeSharedLibs)
nativeSharedLibsLabelListAttribute := bazel.MakeLabelListAttribute(nativeSharedLibsLabelList)
+ prebuilts := module.properties.Prebuilts
+ prebuiltsLabelList := android.BazelLabelForModuleDeps(ctx, prebuilts)
+ prebuiltsLabelListAttribute := bazel.MakeLabelListAttribute(prebuiltsLabelList)
+
binaries := module.properties.ApexNativeDependencies.Binaries
binariesStringListAttribute := bazel.MakeStringListAttribute(binaries)
@@ -3286,6 +3291,7 @@
Installable: installableAttribute,
Native_shared_libs: nativeSharedLibsLabelListAttribute,
Binaries: binariesStringListAttribute,
+ Prebuilts: prebuiltsLabelListAttribute,
}
props := bazel.BazelTargetModuleProperties{