Add support for prebuilts attribute to the bp2build APEX converter.

Test: Updated unit test.

Change-Id: I73dfa84d7a55c0b94393ad6257b5f16313422852
This commit is contained in:
Rupert Shuttleworth
2021-07-28 05:53:42 -04:00
parent 8e5b4c5043
commit 9447e1ee12
2 changed files with 26 additions and 0 deletions

View File

@@ -3197,6 +3197,7 @@ type bazelApexBundleAttributes struct {
Installable bazel.BoolAttribute
Native_shared_libs bazel.LabelListAttribute
Binaries bazel.StringListAttribute
Prebuilts bazel.LabelListAttribute
}
type bazelApexBundle struct {
@@ -3262,6 +3263,10 @@ func apexBundleBp2BuildInternal(ctx android.TopDownMutatorContext, module *apexB
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 @@ func apexBundleBp2BuildInternal(ctx android.TopDownMutatorContext, module *apexB
Installable: installableAttribute,
Native_shared_libs: nativeSharedLibsLabelListAttribute,
Binaries: binariesStringListAttribute,
Prebuilts: prebuiltsLabelListAttribute,
}
props := bazel.BazelTargetModuleProperties{