summaryrefslogtreecommitdiff
path: root/android/module.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2025-02-15 00:18:33 +0000
committer Yu Liu <yudiliu@google.com> 2025-02-19 18:29:46 +0000
commit367827f1d32a0e6ab2ce749cfe0c412474e7b030 (patch)
tree15c1247b2c81de9e80223433f28430e271d98bb1 /android/module.go
parent14b8145bc8a89881a85497e27f12983361bd3bb9 (diff)
Convert stubLibraries, soongMetricsSingleton, sdkSingleton,
complianceMetadataSingleton, freezeApiSingleton and testSuiteFiles to use ModuleProxy. Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I91789633ff0d4e0ab170717caf0a6b4f63c38593
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/android/module.go b/android/module.go
index c4a83777a..f359e9f4d 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1919,6 +1919,9 @@ type CommonModuleInfo struct {
IsStubsModule bool
Host bool
IsApexModule bool
+ // The primary licenses property, may be nil, records license metadata for the module.
+ PrimaryLicensesProperty applicableLicensesProperty
+ Owner string
}
type ApiLevelOrPlatform struct {
@@ -2254,6 +2257,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
buildComplianceMetadataProvider(ctx, m)
commonData := CommonModuleInfo{
+ Enabled: m.Enabled(ctx),
ReplacedByPrebuilt: m.commonProperties.ReplacedByPrebuilt,
Target: m.commonProperties.CompileTarget,
SkipAndroidMkProcessing: shouldSkipAndroidMkProcessing(ctx, m),
@@ -2261,6 +2265,8 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
HideFromMake: m.commonProperties.HideFromMake,
SkipInstall: m.commonProperties.SkipInstall,
Host: m.Host(),
+ PrimaryLicensesProperty: m.primaryLicensesProperty,
+ Owner: m.Owner(),
}
if mm, ok := m.module.(interface {
MinSdkVersion(ctx EarlyModuleContext) ApiLevel
@@ -2289,11 +2295,6 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
commonData.SdkVersion = mm.SdkVersion()
}
- if m.commonProperties.ForcedDisabled {
- commonData.Enabled = false
- } else {
- commonData.Enabled = m.commonProperties.Enabled.GetOrDefault(m.ConfigurableEvaluator(ctx), !m.Os().DefaultDisabled)
- }
if am, ok := m.module.(ApexModule); ok {
commonData.CanHaveApexVariants = am.CanHaveApexVariants()
commonData.NotAvailableForPlatform = am.NotAvailableForPlatform()