bundle config for apexes are auto-generated

bundle config file for apexes are auto-generated. It is included in the
<apex>-base.zip file, which is expected to be extracted and then fed
into the bundletool.

This change is in preparation for the upcoming change to include
information about embedded apks in the bundle confir file.

Bug: 148002117
Test: m

Change-Id: If25d75e0f62036dc777faf8593ed8eb9a74950b0
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 8c5ca8b..0c01238 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -3693,6 +3693,35 @@
 	}))
 }
 
+func TestAppBundle(t *testing.T) {
+	ctx, _ := testApex(t, `
+		apex {
+			name: "myapex",
+			key: "myapex.key",
+			apps: ["AppFoo"],
+		}
+
+		apex_key {
+			name: "myapex.key",
+			public_key: "testkey.avbpubkey",
+			private_key: "testkey.pem",
+		}
+
+		android_app {
+			name: "AppFoo",
+			srcs: ["foo/bar/MyClass.java"],
+			sdk_version: "none",
+			system_modules: "none",
+			apex_available: [ "myapex" ],
+		}
+	`)
+
+	bundleConfigRule := ctx.ModuleForTests("myapex", "android_common_myapex_image").Description("Bundle Config")
+	content := bundleConfigRule.Args["content"]
+
+	ensureContains(t, content, `"compression":{"uncompressed_glob":["apex_payload.img","apex_manifest.*"]}`)
+}
+
 func TestMain(m *testing.M) {
 	run := func() int {
 		setUp()