diff options
author | 2024-10-30 10:08:58 -0700 | |
---|---|---|
committer | 2024-10-30 10:36:02 -0700 | |
commit | 28cc1c734b9686ed9de23bcebf3b93f3aa8fb586 (patch) | |
tree | c0f407c179f8dd0bc33f1dcc9169512c6206d3e0 | |
parent | 60bee2bad8b15af43aef5aba4cb309c45fcb6a83 (diff) |
Make all_apex_contributions a regular module
It was not using any of the capabilities of a singleton module,
and I think the fact that it's a singleton module is causing issues
for the base configuration change. This is also the last singleton
module in the tree, we might be able to remove them after.
Bug: 361816274
Bug: 370379708
Test: m nothing --no-skip-soong-tests
Change-Id: I6193d77837f2e55f7fb6bc41135c8f82fd506c73
-rw-r--r-- | android/apex_contributions.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/android/apex_contributions.go b/android/apex_contributions.go index 4cd8dda93..ce3427840 100644 --- a/android/apex_contributions.go +++ b/android/apex_contributions.go @@ -26,7 +26,7 @@ func init() { func RegisterApexContributionsBuildComponents(ctx RegistrationContext) { ctx.RegisterModuleType("apex_contributions", apexContributionsFactory) ctx.RegisterModuleType("apex_contributions_defaults", apexContributionsDefaultsFactory) - ctx.RegisterSingletonModuleType("all_apex_contributions", allApexContributionsFactory) + ctx.RegisterModuleType("all_apex_contributions", allApexContributionsFactory) } type apexContributions struct { @@ -87,10 +87,10 @@ func apexContributionsDefaultsFactory() Module { // Based on product_config, it will create a dependency on the selected // apex_contributions per mainline module type allApexContributions struct { - SingletonModuleBase + ModuleBase } -func allApexContributionsFactory() SingletonModule { +func allApexContributionsFactory() Module { module := &allApexContributions{} InitAndroidModule(module) return module @@ -191,7 +191,7 @@ func (p *PrebuiltSelectionInfoMap) GetSelectedModulesForApiDomain(apiDomain stri // This module type does not have any build actions. func (a *allApexContributions) GenerateAndroidBuildActions(ctx ModuleContext) { -} - -func (a *allApexContributions) GenerateSingletonBuildActions(ctx SingletonContext) { + if ctx.ModuleName() != "all_apex_contributions" { + ctx.ModuleErrorf("There can only be 1 all_apex_contributions module in build/soong") + } } |