Add an apex_contributions_defaults module to module sdk
This metadata module will contain a flattened list of all the soong
modules contributed by this module to the rest of the build. This is
supported in V and above.
Bug: 326246905
Test: m art-module-host-exports
Test: unzip -p out/soong/mainline-sdks/art-module-host-exports-current.zip Android.bp | grep -A 15 apex_contributions_defaults
apex_contributions_defaults {
name: "art-module-host-exports.contributions",
contents: [
"prebuilt_art.module.api.annotations",
"prebuilt_dex2oat",
"prebuilt_dex2oatd",
"prebuilt_dexdump",
"prebuilt_hiddenapi",
"prebuilt_oatdump",
"prebuilt_profman",
"prebuilt_veridex",
"prebuilt_libartpalette",
"prebuilt_libartbase",
],
}
Change-Id: Iba43a9da5430adfc0a5fd9b5dc27b5d89c5eacb8
diff --git a/sdk/bootclasspath_fragment_sdk_test.go b/sdk/bootclasspath_fragment_sdk_test.go
index 5d41958..8d3bbfa 100644
--- a/sdk/bootclasspath_fragment_sdk_test.go
+++ b/sdk/bootclasspath_fragment_sdk_test.go
@@ -152,6 +152,11 @@
checkAndroidBpContents(`
// This is auto-generated. DO NOT EDIT.
+apex_contributions_defaults {
+ name: "mysdk.contributions",
+ contents: [],
+}
+
prebuilt_bootclasspath_fragment {
name: "art-bootclasspath-fragment",
prefer: false,
@@ -187,6 +192,7 @@
apex_available: ["com.android.art"],
jars: ["java_boot_libs/snapshot/jars/are/invalid/core2.jar"],
}
+
`),
checkAllCopyRules(`
.intermediates/art-bootclasspath-fragment/android_common/modular-hiddenapi/annotation-flags.csv -> hiddenapi/annotation-flags.csv
@@ -353,6 +359,15 @@
checkAndroidBpContents(`
// This is auto-generated. DO NOT EDIT.
+apex_contributions_defaults {
+ name: "mysdk.contributions",
+ contents: [
+ "prebuilt_myothersdklibrary",
+ "prebuilt_mysdklibrary",
+ "prebuilt_mycoreplatform",
+ ],
+}
+
prebuilt_bootclasspath_fragment {
name: "mybootclasspathfragment",
prefer: false,
@@ -642,6 +657,11 @@
checkAndroidBpContents(`
// This is auto-generated. DO NOT EDIT.
+apex_contributions_defaults {
+ name: "mysdk.contributions",
+ contents: ["prebuilt_mysdklibrary"],
+}
+
prebuilt_bootclasspath_fragment {
name: "mybootclasspathfragment",
prefer: false,
@@ -881,6 +901,14 @@
checkAndroidBpContents(`
// This is auto-generated. DO NOT EDIT.
+apex_contributions_defaults {
+ name: "mysdk.contributions",
+ contents: [
+ "prebuilt_mynewlibrary",
+ "prebuilt_mysdklibrary",
+ ],
+}
+
prebuilt_bootclasspath_fragment {
name: "mybootclasspathfragment",
prefer: false,
@@ -1008,6 +1036,9 @@
android.FixtureMergeEnv(map[string]string{
"SOONG_SDK_SNAPSHOT_TARGET_BUILD_RELEASE": targetBuildRelease,
}),
+ android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
+ variables.Platform_version_active_codenames = []string{"VanillaIceCream"}
+ }),
android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
variables.BuildFlags = map[string]string{
@@ -1226,6 +1257,9 @@
android.FixtureMergeEnv(map[string]string{
"SOONG_SDK_SNAPSHOT_TARGET_BUILD_RELEASE": "S",
}),
+ android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
+ variables.Platform_version_active_codenames = []string{"VanillaIceCream"}
+ }),
android.FixtureWithRootAndroidBp(`
sdk {
name: "mysdk",