Merge "Add bp2build support for property "compressible" of apex module." am: a61dbd457e am: c311b19b3a am: 254b753da8 am: 7e82c20b19

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1956876

Change-Id: Ie5033ec7691a8613548ba124822cb272831bd5c7
diff --git a/apex/apex.go b/apex/apex.go
index dc5e00c..0c8c5be 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -3291,6 +3291,7 @@
 	Prebuilts             bazel.LabelListAttribute
 	Native_shared_libs_32 bazel.LabelListAttribute
 	Native_shared_libs_64 bazel.LabelListAttribute
+	Compressible          bazel.BoolAttribute
 }
 
 type convertedNativeSharedLibs struct {
@@ -3368,6 +3369,11 @@
 		installableAttribute.Value = a.properties.Installable
 	}
 
+	var compressibleAttribute bazel.BoolAttribute
+	if a.overridableProperties.Compressible != nil {
+		compressibleAttribute.Value = a.overridableProperties.Compressible
+	}
+
 	attrs := &bazelApexBundleAttributes{
 		Manifest:              manifestLabelAttribute,
 		Android_manifest:      androidManifestLabelAttribute,
@@ -3381,6 +3387,7 @@
 		Native_shared_libs_64: nativeSharedLibs.Native_shared_libs_64,
 		Binaries:              binariesLabelListAttribute,
 		Prebuilts:             prebuiltsLabelListAttribute,
+		Compressible:          compressibleAttribute,
 	}
 
 	props := bazel.BazelTargetModuleProperties{
diff --git a/bp2build/apex_conversion_test.go b/bp2build/apex_conversion_test.go
index 4b141c9..9057189 100644
--- a/bp2build/apex_conversion_test.go
+++ b/bp2build/apex_conversion_test.go
@@ -104,6 +104,7 @@
 	certificate: "com.android.apogee.certificate",
 	updatable: false,
 	installable: false,
+	compressible: false,
 	native_shared_libs: [
 	    "native_shared_lib_1",
 	    "native_shared_lib_2",
@@ -150,7 +151,8 @@
         ":pretend_prebuilt_1",
         ":pretend_prebuilt_2",
     ]`,
-				"updatable": "False",
+				"updatable":    "False",
+				"compressible": "False",
 			}),
 		}})
 }