Revert "Add some more properties to the bp2build APEX converter."
This reverts commit 69bf4c0d605c0c10cd0f1180ec7398732abc4364.
Reason for revert: Possibly broke CI (https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master-bazel&target=bp2build-incremental&lkgb=7266256&fkbb=7237028), rolling back just in case...
Change-Id: I14ebac4f47576a73285d1f724ae4499036e8e678
diff --git a/apex/apex.go b/apex/apex.go
index 6f8f9c0..d385ac1 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -3187,16 +3187,7 @@
// For Bazel / bp2build
type bazelApexBundleAttributes struct {
- Manifest bazel.LabelAttribute
- Android_manifest bazel.LabelAttribute
- File_contexts string
- Key bazel.LabelAttribute
- Certificate bazel.LabelAttribute
- Min_sdk_version string
- Updatable bazel.BoolAttribute
- Installable bazel.BoolAttribute
- Native_shared_libs bazel.LabelListAttribute
- Binaries bazel.StringListAttribute
+ Manifest bazel.LabelAttribute
}
type bazelApexBundle struct {
@@ -3229,63 +3220,14 @@
func apexBundleBp2BuildInternal(ctx android.TopDownMutatorContext, module *apexBundle) {
var manifestLabelAttribute bazel.LabelAttribute
+
+ manifestStringPtr := module.properties.Manifest
if module.properties.Manifest != nil {
- manifestLabelAttribute.SetValue(android.BazelLabelForModuleSrcSingle(ctx, *module.properties.Manifest))
- }
-
- var androidManifestLabelAttribute bazel.LabelAttribute
- if module.properties.AndroidManifest != nil {
- androidManifestLabelAttribute.SetValue(android.BazelLabelForModuleSrcSingle(ctx, *module.properties.AndroidManifest))
- }
-
- var fileContexts string
- if module.properties.File_contexts != nil {
- fileContexts = *module.properties.File_contexts
- }
-
- var minSdkVersion string
- if module.properties.Min_sdk_version != nil {
- minSdkVersion = *module.properties.Min_sdk_version
- }
-
- var keyLabelAttribute bazel.LabelAttribute
- if module.overridableProperties.Key != nil {
- keyLabelAttribute.SetValue(android.BazelLabelForModuleDepSingle(ctx, *module.overridableProperties.Key))
- }
-
- var certificateLabelAttribute bazel.LabelAttribute
- if module.overridableProperties.Certificate != nil {
- certificateLabelAttribute.SetValue(android.BazelLabelForModuleDepSingle(ctx, *module.overridableProperties.Certificate))
- }
-
- nativeSharedLibs := module.properties.ApexNativeDependencies.Native_shared_libs
- nativeSharedLibsLabelList := android.BazelLabelForModuleDeps(ctx, nativeSharedLibs)
- nativeSharedLibsLabelListAttribute := bazel.MakeLabelListAttribute(nativeSharedLibsLabelList)
-
- binaries := module.properties.ApexNativeDependencies.Binaries
- binariesStringListAttribute := bazel.MakeStringListAttribute(binaries)
-
- var updatableAttribute bazel.BoolAttribute
- if module.properties.Updatable != nil {
- updatableAttribute.Value = module.properties.Updatable
- }
-
- var installableAttribute bazel.BoolAttribute
- if module.properties.Installable != nil {
- installableAttribute.Value = module.properties.Installable
+ manifestLabelAttribute.SetValue(android.BazelLabelForModuleSrcSingle(ctx, *manifestStringPtr))
}
attrs := &bazelApexBundleAttributes{
- Manifest: manifestLabelAttribute,
- Android_manifest: androidManifestLabelAttribute,
- File_contexts: fileContexts,
- Min_sdk_version: minSdkVersion,
- Key: keyLabelAttribute,
- Certificate: certificateLabelAttribute,
- Updatable: updatableAttribute,
- Installable: installableAttribute,
- Native_shared_libs: nativeSharedLibsLabelListAttribute,
- Binaries: binariesStringListAttribute,
+ Manifest: manifestLabelAttribute,
}
props := bazel.BazelTargetModuleProperties{