Add defaults support for apex_contributions module type
Bug: 326246905 Test: go build ./android Change-Id: I8be21594465d81c99c216b0fcbf9996aed46c209
This commit is contained in:
@@ -25,11 +25,13 @@ func init() {
|
||||
|
||||
func RegisterApexContributionsBuildComponents(ctx RegistrationContext) {
|
||||
ctx.RegisterModuleType("apex_contributions", apexContributionsFactory)
|
||||
ctx.RegisterModuleType("apex_contributions_defaults", apexContributionsDefaultsFactory)
|
||||
ctx.RegisterSingletonModuleType("all_apex_contributions", allApexContributionsFactory)
|
||||
}
|
||||
|
||||
type apexContributions struct {
|
||||
ModuleBase
|
||||
DefaultableModuleBase
|
||||
properties contributionProps
|
||||
}
|
||||
|
||||
@@ -59,6 +61,7 @@ func apexContributionsFactory() Module {
|
||||
module := &apexContributions{}
|
||||
module.AddProperties(&module.properties)
|
||||
InitAndroidModule(module)
|
||||
InitDefaultableModule(module)
|
||||
return module
|
||||
}
|
||||
|
||||
@@ -68,6 +71,18 @@ func apexContributionsFactory() Module {
|
||||
func (m *apexContributions) GenerateAndroidBuildActions(ctx ModuleContext) {
|
||||
}
|
||||
|
||||
type apexContributionsDefaults struct {
|
||||
ModuleBase
|
||||
DefaultsModuleBase
|
||||
}
|
||||
|
||||
func apexContributionsDefaultsFactory() Module {
|
||||
module := &apexContributionsDefaults{}
|
||||
module.AddProperties(&contributionProps{})
|
||||
InitDefaultsModule(module)
|
||||
return module
|
||||
}
|
||||
|
||||
// A container for apex_contributions.
|
||||
// Based on product_config, it will create a dependency on the selected
|
||||
// apex_contributions per mainline module
|
||||
|
Reference in New Issue
Block a user