aboutsummaryrefslogtreecommitdiff
path: root/build/mainline_modules_sdks_test_data
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2022-06-08 11:06:00 +0000
committerPaul Duffin <paulduffin@google.com>2022-06-09 11:29:01 +0000
commitd29f8e059712d28346eb2b92ef7b5780695ed3ad (patch)
tree03c0c69f7b52daa5dd7dd96e09c685735f2ec1fd /build/mainline_modules_sdks_test_data
parent2ec8e5cd497c041ebc664c907f7961f86f9c7602 (diff)
downloadcommon-d29f8e059712d28346eb2b92ef7b5780695ed3ad.tar.gz
Generate soong_config_module_type inline in the snapshot
Previously, this imported the soong_config_module_type definitions from a manually curated file. That had a couple of problems: 1. It required that the file be manually updated everytime that a new module_type was added to an sdk snapshot controlled by a specific config variable. 2. Adding a new config variable required creating another file to be manually curated. 3. It made a snapshot that was generated for an earlier release dependent on an additional file from that release which was in a separate repository and would require a lot of extra work to update if necessary. This change generates the soong_config_module_type inline in the snapshot Android.bp file and while it makes it slightly bigger and does duplicate some of these definitions in snapshots that use the same config variable it makes each snapshot much more self contained and makes it easier to add module specific config variables. The latter is the main driver for this change as follow up changes will add module specific variables for the optional modules. Bug: 233965247 Test: atest mainline_modules_sdks_test packages/modules/common/build/mainline_modules_sdks.sh # Compare before and after to make sure that they are # consistent. Change-Id: Ie6b6d99e1fcb17ebd8ed291a5bc7d4664fceea92
Diffstat (limited to 'build/mainline_modules_sdks_test_data')
-rw-r--r--build/mainline_modules_sdks_test_data/art_Android.bp.expected33
-rw-r--r--build/mainline_modules_sdks_test_data/ipsec_Android.bp.expected23
2 files changed, 41 insertions, 15 deletions
diff --git a/build/mainline_modules_sdks_test_data/art_Android.bp.expected b/build/mainline_modules_sdks_test_data/art_Android.bp.expected
index 135e4e6c..8fc0455e 100644
--- a/build/mainline_modules_sdks_test_data/art_Android.bp.expected
+++ b/build/mainline_modules_sdks_test_data/art_Android.bp.expected
@@ -1,13 +1,30 @@
// This is auto-generated. DO NOT EDIT.
-// Soong config variable stanza added by test_art.
-soong_config_module_type_import {
- from: "prebuilts/module_sdk/art/SoongConfig.bp",
- module_types: [
- "art_prebuilt_java_import",
- "art_prebuilt_prebuilt_bootclasspath_fragment",
- "art_prebuilt_prebuilt_platform_compat_config",
- ],
+// Soong config variable module type added by test_art.
+soong_config_module_type {
+ name: "art_prebuilt_java_import",
+ module_type: "java_import",
+ config_namespace: "art_module",
+ bool_variables: ["source_build"],
+ properties: ["prefer"],
+}
+
+// Soong config variable module type added by test_art.
+soong_config_module_type {
+ name: "art_prebuilt_prebuilt_bootclasspath_fragment",
+ module_type: "prebuilt_bootclasspath_fragment",
+ config_namespace: "art_module",
+ bool_variables: ["source_build"],
+ properties: ["prefer"],
+}
+
+// Soong config variable module type added by test_art.
+soong_config_module_type {
+ name: "art_prebuilt_prebuilt_platform_compat_config",
+ module_type: "prebuilt_platform_compat_config",
+ config_namespace: "art_module",
+ bool_variables: ["source_build"],
+ properties: ["prefer"],
}
package {
diff --git a/build/mainline_modules_sdks_test_data/ipsec_Android.bp.expected b/build/mainline_modules_sdks_test_data/ipsec_Android.bp.expected
index 99640c05..1a3d3432 100644
--- a/build/mainline_modules_sdks_test_data/ipsec_Android.bp.expected
+++ b/build/mainline_modules_sdks_test_data/ipsec_Android.bp.expected
@@ -1,12 +1,21 @@
// This is auto-generated. DO NOT EDIT.
-// Soong config variable stanza added by test_common_mainline_module.
-soong_config_module_type_import {
- from: "packages/modules/common/Android.bp",
- module_types: [
- "module_java_sdk_library_import",
- "module_prebuilt_bootclasspath_fragment",
- ],
+// Soong config variable module type added by test_common_mainline_module.
+soong_config_module_type {
+ name: "module_java_sdk_library_import",
+ module_type: "java_sdk_library_import",
+ config_namespace: "ANDROID",
+ bool_variables: ["module_build_from_source"],
+ properties: ["prefer"],
+}
+
+// Soong config variable module type added by test_common_mainline_module.
+soong_config_module_type {
+ name: "module_prebuilt_bootclasspath_fragment",
+ module_type: "prebuilt_bootclasspath_fragment",
+ config_namespace: "ANDROID",
+ bool_variables: ["module_build_from_source"],
+ properties: ["prefer"],
}
package {