summaryrefslogtreecommitdiff
path: root/android/module.go
diff options
context:
space:
mode:
author Justin Yun <justinyun@google.com> 2025-03-18 02:32:04 -0700
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2025-03-18 02:32:04 -0700
commitd648ee443516cc45f349c9a8322550cf375f7eec (patch)
tree8e289a62ad2dab9cbaec0aab99bdc3143b0ff47e /android/module.go
parentd9371e99fcdcd958d20b26357a0393d2fd7f279e (diff)
parentbe6f81d61e25753eeecdb65bdf7dd2bb6d4c1a5c (diff)
Generic configuration for generic system modules. am: be6f81d61e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3425639 Change-Id: Ifbe0aafb22e2eefab07e1da8a9f4dbce8ddde32c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go
index a3fe837a5..87377cc75 100644
--- a/android/module.go
+++ b/android/module.go
@@ -128,6 +128,9 @@ type Module interface {
// WARNING: This should not be used outside build/soong/fsgen
// Overrides returns the list of modules which should not be installed if this module is installed.
Overrides() []string
+
+ // If this is true, the module must not read product-specific configurations.
+ UseGenericConfig() bool
}
// Qualified id for a module
@@ -507,6 +510,10 @@ type commonProperties struct {
// List of module names that are prevented from being installed when this module gets
// installed.
Overrides []string
+
+ // Set to true if this module must be generic and does not require product-specific information.
+ // To be included in the system image, this property must be set to true.
+ Use_generic_config *bool
}
// Properties common to all modules inheriting from ModuleBase. Unlike commonProperties, these
@@ -2588,6 +2595,10 @@ func (m *ModuleBase) Overrides() []string {
return m.commonProperties.Overrides
}
+func (m *ModuleBase) UseGenericConfig() bool {
+ return proptools.Bool(m.commonProperties.Use_generic_config)
+}
+
type ConfigContext interface {
Config() Config
}